Design Patterns Flashcards
Creational
Class instantiation or object creation Abstract factory Builder Method Prototype Singleton
Structural
Organizing different classes and objects to form larger structures that provide new functionality Relationship between objects Adapter Bridge Composite Decorator Facade Flyweight Proxy
Abstract factory
Creational pattern
Produce families of related objects without concrete classes
Builder
Creational pattern
build a complex object using simple objects and step by step approach
Method
Creational pattern provides interface for creating objects in a super class but allow subclass to alter type of object created.
Prototype
Clone existing object/clone new instance from prototype
Singletone
Creational pattern Ensure only one instance of the class and provide a global access point to this instance
Adapter
Structural Pattern
Allow objects with different interfaces to collaborate
Bridge
Structural Pattern
Composite
Structural Pattern
Compose objects into tree structure, treat this group of objects similar way to a single object
Decorator
Structural Pattern Add new functionality to objects by wrapping it in a decorator class with the new behaviours
Facade
Structural Pattern
provides a simple interface to hide complexity of existing system
Flyweight
Structural Pattern
Fit more objects into available amount of RAM by sharing common parts of state between multiple objects
Proxy
Structural Pattern
Behaviour Design Pattern
Communication or interaction between objects