- Adapter: Allows objects with incompatible interfaces to work together. - Bridge: Separates an object's interface from its implementation, allowing the two to vary independently. - Composite: Builds complex structures from simple components. - Decorator: Adds additional functionality to an object without changing its underlying class. - Facade: Provides a simplified interface to a complex system or set of classes. - Flyweight: Reduces memory usage by sharing common objects instead of creating new ones. - Proxy: Provides an interface to an object that is controlled by another object.
Creational Patterns:
- Abstract Factory: Provides an interface for creating families of related objects without specifying their concrete classes. - Builder: Separates the construction of a complex object from its representation. - Factory Method: Defines an interface for creating an object, but lets subclasses decide which class to instantiate. - Prototype: Creates new objects by copying an existing object. - Singleton: Ensures that a class has only one instance and provides a global point of access to it.
Behavioral Patterns:
- Chain of Responsibility: Allows objects to handle requests in a sequential order until one of them handles it. - Command: Encapsulates a request as an object so that it can be parameterized, queued, logged, or undone. - Interpreter: Interprets a language grammar to define the execution of commands. - Iterator: Provides a way to access the elements of a collection without exposing its underlying representation. - Mediator: Defines an object that mediates communication between a set of objects, controlling their interactions. - Observer: Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. - State: Allows an object to alter its behavior when its internal state changes. - Strategy: Defines a family of algorithms, encapsulates each one, and makes them interchangeable. - Template Method: Defines the skeleton of an algorithm, allowing subclasses to redefine certain steps without changing the overall structure.