| Creational |
Abstract Factory |
Provides an interface for creating families of related or dependent objects. |
|
Builder |
Constructs complex objects step by step. |
|
Factory Method |
Defines an interface for creating objects, but allows subclasses to alter the type of objects that will be created. |
|
Option Function |
Uses function parameters to set configuration options. |
|
Property |
Provides access to an object's properties in a controlled manner. |
|
Singleton |
Ensures a class has only one instance and provides a global point of access to it. |
| Structural |
Adapter |
Converts one interface to another expected by the client. |
|
Bridge |
Decouples an abstraction from its implementation so both can vary independently. |
|
Composite |
Composes objects into tree-like structures to represent part-whole hierarchies. |
|
Decorator |
Adds behavior to an object dynamically without altering its structure. |
|
Facade |
Provides a simplified interface to a complex subsystem. |
|
Flyweight |
Reduces memory usage by sharing common parts of an object. |
|
Proxy |
Provides a surrogate or placeholder for another object. |
| Behavioral |
Chain of Responsibility |
Allows passing a request along a chain of handlers. |
|
Command |
Encapsulates a request as an object, allowing for parameterization of clients. |
|
Interpreter |
Defines a grammatical representation for a language and an interpreter. |
|
Iterator |
Provides a way to access elements of a collection sequentially. |
|
Mediator |
Centralizes communication between objects to reduce dependencies. |
|
Memento |
Captures and restores an object's internal state without exposing it. |
|
Observer |
Notifies dependent objects about changes in the state of an object. |
|
State |
Allows an object to change its behavior when its internal state changes. |
|
Strategy |
Defines a family of algorithms and makes them interchangeable. |
|
Template Method |
Defines the structure of an algorithm, deferring specific steps to subclasses. |
|
Visitor |
Allows you to add further operations to objects without modifying them. |