Description
Design patterns differ by their complexity, level of detail, and scale of applicability to the entire system being designed.
- The most basic and low-level patterns are often called idioms.
- They usually apply only to a single programming language.
- The most universal and high-level patterns are called architectural patterns.
- Developers can implement these patterns in virtually any language.
- Unlike other patterns, these can be used to design the architecture of an entire application.
In addition, the design patterns can also be categorized by their purpose into three main categories as mentioned below.
Type | Description | Patterns |
Creational Patterns | Concerned with the object creation mechanisms, which increase flexibility and reuse of existing code.
|
Factory, Abstract Factory, Singleton, Prototype, and Builder |
Structural Patterns | Concerned about how to assemble objects and classes into larger structures, keeping the structures flexible and efficient.
|
Adapter, Bridge, Composite, Prototype, Decorator, Facade, Flyweight, Proxy |
Behavioral Patterns | Concerned with algorithms and the assignment of responsibilities between objects, making the communication between objects easy.
|
Chain of Responsibility, Command, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor |
Overall
We now understood how the design patterns are classified into different types.