Creational design pattern
list of patterns categorised as creational
Abstract Factory: explanation here | code here
Creates an instance of several families of classes
Builder: explanation here | code here
Separates object construction from its representation
Factory Method: explanation here | code here
Creates an instance of several derived classes
Object Pool: explanation here | code here (TODO: document)
Avoid expensive acquisition and release of resources by recycling objects that are no longer in use
Prototype: explanation here | code here
A fully initialized instance to be copied or cloned
Singleton: explanation here | code here
A class of which only a single instance can exist
Structural design pattern
list of patterns categorised as Structural
Adapter: explanation here | code here
Match interfaces of different classes
Bridge: explanation here | code here
Separates an object’s interface from its implementation
Composite: explanation here | code here
A tree structure of simple and composite objects
Decorator: explanation here | code here
Add responsibilities to objects dynamically
Facade: explanation here | code here
A single class that represents an entire subsystem
Flyweight: explanation here | code here
A fine-grained instance used for efficient sharing
Private Class Data: explanation here | code here (TODO: document)
Restricts accessor/mutator access
Proxy: explanation here | code here
An object representing another object
Behavioural design pattern
list of patterns categorised as behavioural
Chain of responsibility: explanation here | code here (TODO: document)
A way of passing a request between a chain of objects
Command: explanation here | code here (TODO: document)
Encapsulate a command request as an object
Interpreter: explanation here | code here (TODO: document)
A way to include language elements in a program
Iterator: explanation here | code here (TODO: document)
Sequentially access the elements of a collection
Mediator: explanation here | code here (TODO: document)
Defines simplified communication between classes
Memento: explanation here | code here (TODO: document)
Capture and restore an object's internal state
Null Object: explanation here | code here (TODO: document)
Designed to act as a default value of an object
Observer: explanation here | code here (TODO: document)
A way of notifying change to a number of classes
State: explanation here | code here (TODO: document)
Alter an object's behavior when its state changes
Strategy: explanation here | code here
Encapsulates an algorithm inside a class
Template method: explanation here | code here
Defer the exact steps of an algorithm to a subclass
Visitor: explanation here | code here (TODO: document)
Defines a new operation to a class without change