Design Patterns

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/37

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:52 AM on 12/10/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

38 Terms

1
New cards

Design Pattern Definition

A proven advice for solving a recurring class of problems by providing a template-like solution rather than a finished design.

2
New cards

Benefits of Design Patterns

Increase reusability, maintainability, clarity, and communication among developers.

3
New cards

Are design patterns language independent? Are they finished code?

They are language-independent and serve as conceptual templates, not finished code.

4
New cards

Architectural Design Pattern

A high-level solution that defines the structure of a system, dividing it into components/layers and specifying their communication rules.

5
New cards

Scope of Architectural Patterns

Consider the whole application, providing the first level of abstraction.

6
New cards

Common Architectural Patterns

Multi-Layer, MVC

7
New cards

Multi-Layer Pattern Definition

Divides an application into independent layers that provide services to their neighboring layers.

8
New cards

3-Layer (Multi layer) Architecture

Presentation layer, Business Rules layer, Data Management layer.

9
New cards

Presentation Layer Responsibilities

Handles UI/UX and interacts with the user.

10
New cards

Business Rules Processing Layer Responsibilities

Handles computations, logic, and application flow in Multilayer Architectural Design Pattern

11
New cards

Data Management Layer Responsibilities

Handles storage, retrieval, and database/file operations.

12
New cards

Do the layers all know each other?

Each layer knows only its neighbors, reducing tight coupling.

13
New cards

Benefits of Multi-Layer Pattern

Separation of concerns, fewer dependencies, readability, reusability, testability, maintainability.

14
New cards

What are the names of the MVC Pattern layers?

Divides an application into Model, View, and Controller to separate logic from UI.

15
New cards

Model (MVC) Responsibilities

Manages data, business rules, and state changes

16
New cards

View (MVC) Responsibilities

Displays information to the user and receives no direct data-manipulation ability.

17
New cards

Controller (MVC) Responsibilities

Handles user input, interprets View events, updates the Model.

18
New cards

MVC Interaction Flow

User → View → Controller → Model → View updates.

19
New cards

Benefits of MVC

Structural clarity, maintainability, reusable UI components, prevents direct user manipulation of data.

20
New cards

Can there be multiple Views in MVC with one model?

One model can update many views simultaneously.

21
New cards

Class Design Pattern

Lower-level design solutions that focus on interactions among a few classes.

22
New cards

What are the Three Types of Class Design Patterns?

Creational, Structural, Behavioral.

23
New cards

Singleton Pattern Definition

Ensures exactly one instance of a class exists at runtime and provides global access to it.

24
New cards

How Singleton Works

Private constructor, static instance variable, and a public static getter method.

25
New cards

Why Constructor Is Private in Singleton

Prevents creation of multiple instances.

26
New cards

Singleton Instance Lifetime

Instantiated once, usually when the class loads.

27
New cards

Composite Pattern

Treats individual objects and composite groups uniformly by having both implement the same interface/abstraction.

28
New cards

Why Composite Helps

Simplifies code, supports extension, and unifies behavior of single items and groups.

29
New cards

Composite Structure

Component interface + leaf classes + composite classes containing children.

30
New cards

Façade Pattern

Provides a simplified interface to a complex subsystem, exposing only necessary operations.

31
New cards

Problem Scenario that Façade solves

A client depends on many classes and sees methods it shouldn’t or doesn’t need.

32
New cards

Façade Solution

A wrapper class delegates tasks to subsystem classes but exposes a clean interface.

33
New cards

Façade Benefit

Reduces coupling, hides complexity, and improves client-side code clarity.

34
New cards

Strategy Pattern

Allows selecting an algorithm’s behavior at runtime by encapsulating each variant in its own class.

35
New cards

What is a Context Class in (Strategy)

Uses a Strategy interface reference and executes whichever strategy is assigned.

36
New cards

Template Method Pattern Definition

Defines the skeleton of an algorithm in a superclass method, leaving certain steps abstract for subclasses to implement.

37
New cards

What does the concrete method do in Template Method?

A concrete method calls one or more abstract methods and provide their own implementations to complete its algorithm.

38
New cards

Benefits of Template Method

Allows algorithm structure to remain fixed while subclasses customize steps.

Explore top flashcards

WY 4 Unit 4
Updated 1064d ago
flashcards Flashcards (40)
Ordlista 1
Updated 498d ago
flashcards Flashcards (30)
Bio Cell Membrane
Updated 512d ago
flashcards Flashcards (22)
AP EURO unit 1
Updated 904d ago
flashcards Flashcards (34)
Vocab 6B
Updated 1148d ago
flashcards Flashcards (23)
german final vocab
Updated 1157d ago
flashcards Flashcards (78)
WY 4 Unit 4
Updated 1064d ago
flashcards Flashcards (40)
Ordlista 1
Updated 498d ago
flashcards Flashcards (30)
Bio Cell Membrane
Updated 512d ago
flashcards Flashcards (22)
AP EURO unit 1
Updated 904d ago
flashcards Flashcards (34)
Vocab 6B
Updated 1148d ago
flashcards Flashcards (23)
german final vocab
Updated 1157d ago
flashcards Flashcards (78)