Software design patterns Flashcards
what are the 3 types of software design patterns
Creational patterns, Structural patterns, Behavioural patterns
what does the creational design pattern consist of?
Abstract Factory: For building related objects
Builder: Building complex objects incrementally
Method: Method in a derived class creates associates
Prototype: cloning new instances from a prototype
Singleton: A singular (sole) instance
what does the structural design pattern consist of?
Adapter: Translator adapts a server interface for a client
Bridge: Abstraction for binding one of many implementations
Composite: Structure for building recursive aggregations
Decorator: Decorator extends an object transparently
Facade: Simplifies the interface for a subsystem
Flyweight: Many fine-grained objects shared efficiently.
Proxy: One object approximates another.
what does the behavioural design pattern consist of?
Chain of Responsibility: Request delegated to the responsible service provider
Command: Request or Action is first-class object, hence re-storable
Iterator: Aggregate and access elements sequentially
Interpreter: Language interpreter for a small grammar
Mediator: Coordinates interactions between its associates
Memento: Snapshot captures and restores object states privately
Observer: Dependents update automatically when subject changes
State: Object whose behaviour depends on its state
Strategy: Abstraction for selecting one of many algorithms
Template Method: Algorithm with some steps supplied by a derived class
Visitor: Operations applied to elements of a heterogeneous object structure