Design Patterns Flashcards
Overall types
- Creational (creating objects)
- Structural (relations b/w objects)
- Behavioral (interaction b/w objects)
Design Patterns Book
Elements of Reusable Object Oriented SW - by Gang of 4
Creational: Abstract Factory
Creates an instance of several families of classes
Creational: Builder
Separates object constructions from its representation
Creational: Factory Method
Creates an instance of several derived classes
Creational: Object Pool
Avoid expensive acquisition and release of resources by recycling objects that are no longer in use
Creational: Prototype
A fully initialized instance to be copied or cloned
Creational: Singleton
A class of which only a single instance can exist
Structural: Adapter
Match interfaces of different classes
Structural: Bridge
Separates an object’s interface from its implementation
Structural: Composite
A tree structure of simple and composite objects
Structural: Decorator
Add responsibilities to objects dynamically
Structural: Facade
A single class that represents an entire subsystem
Structural: Flyweight
A fine-grained instance used for efficient sharing
Structural: Private Class Data
Restricts accessor/mutator access