Creational Pattern
An abstract factory offers the interface for creating a set of related or dependant objects without explicitly specifying their classes. The type of the created objects are determined at run-time.
Structural Pattern
The adapter pattern is a design pattern that is used to allow two incompatible types to communicate. Where one class relies upon a specific interface that is not implemented by another class, the adapter acts as a translator between the two types.
Structural Pattern
The bridge pattern is a design pattern that separates the abstract elements of a class from its technical implementation. This provides a cleaner implementation of real-world objects and allows the implementation details to be changed easily.
Creational Pattern
Instead of using numerous constructors, the builder pattern uses a builder object, that instantiates and initializes objects using a multiple of steps.
Behavioral Pattern
The chain of responsibility pattern is a design pattern that defines a linked list of handlers, each of which is able to process requests. When a request is submitted to the chain, it is passed to the first handler in the list that is able to process it.
Behavioral Pattern
A command object encapsulates a request as an object. This object is sent to a receiver which executes the command. The advantage of this technique is that the requests can be queued, logged or implemented to support undo/redo.
Structural Pattern
The composite pattern describes a way to create tree structures using objects and object groups. The clients can access and use individual objects and compositions in the same manner.
Structural Pattern
A decorator allows to add behavior to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class.
Structural Pattern
The facade pattern is used to define a simplified interface to a more complex subsystem.
Creational Pattern
An object with methods to create objects without specifying the exact class that will be created. Depending on the concrete factory implementation objects with different classes are created.
Structural Pattern
The flyweight pattern is used to reduce the memory and resource usage for complex models containing many hundreds, thousands or hundreds of thousands of similar objects.
Behavioral Pattern
The interpreter pattern is used to define the grammar for instructions that form part of a language or notation, whilst allowing the grammar to be easily extended.
Behavioral Pattern
An iterator provides the interface to traverse a container's elements. The implementation is hidden so that the client does not need to understand the traversing algorithm.
Behavioral Pattern
The mediator pattern is used to reduce coupling between classes that communicate with each other. Instead of classes communicating directly, and thus requiring knowledge of their implementation, the classes send messages via a mediator object.
Behavioral Pattern
The memento pattern is used to capture the current state of an object and store it in such a manner that it can be restored at a later time without breaking the rules of encapsulation.
Behavioral Pattern
The observer pattern is used to allow an object to publish changes to its state. Other objects subscribe to be immediately notified of any changes.
Creational Pattern
The prototype pattern is used to instantiate a new object by copying all of the properties of an existing object, creating an independent clone. This practise is particularly useful when the construction of a new object is inefficient.
Structural Pattern
The proxy pattern is used to provide a surrogate or placeholder object, which references an underlying object. The proxy provides the same public interface as the underlying subject class, adding a level of indirection by accepting requests from a client object and passing these to the real subject object as necessary.
Creational Pattern
A singleton is an object whose class can only have one instance. A singleton class ensures that only one instance of the class can be created. The pattern is often called an anti-pattern because it may lead to high coupling of components.
Behavioral Pattern
The state pattern is used to alter the behaviour of an object as its internal state changes. The pattern allows the class for an object to apparently change at run-time.