In the book Design Patterns: Elements of Reusable Object-Oriented Software, the design patterns have been classified into three major categories:
- Creational patterns: These patterns define how the objects can be created so that your code can be made independent of which objects are present, and hence decouples it from the impact that may happen when new objects are introduced into the code base. This requires the isolation of the object creation logic from the code base. The patterns, such as Singleton and Factory, come under the category of creational patterns.
- Structural patterns: Unlike creational patterns, which deal with how the objects are created, the structural patterns are often used to describe ...