𝗗𝗲𝘀𝗶𝗴𝗻 𝗣𝗮𝘁𝘁𝗲𝗿𝗻𝘀
Here are the common design patterns, categorizing them into Structural and Creational types. Here's a quick breakdown of each pattern in the image:
Structural Patterns
- Adapter: Converts an interface into one expected by clients, enabling interaction between incompatible interfaces.
- Proxy: Provides a surrogate or placeholder to control access to another object.
- Bridge: Decouples an abstraction from its implementation to enable independent development.
- Composite: Represents tree structures for part-whole hierarchies, treating individual objects and compositions uniformly.
- Decorator: Dynamically adds responsibilities to objects without altering their structure.
- Facade: Simplifies subsystem interfaces by providing a unified high-level interface.
- Flyweight: Minimizes memory usage by sharing as much data as possible with similar objects.
Creational Patterns
- Abstract Factory: Creates families of related objects without specifying their concrete classes.
- Builder: Constructs complex objects step by step, separating construction logic from representation.
- Factory Method: Defines an interface for creating objects but lets subclasses decide the instantiation.
- Prototype: Clones objects to produce new instances without using the
new
keyword. - Singleton: Ensures a class has only one instance and provides a global point of access.
No comments:
Post a Comment