Design Patterns – DZone Refcardz
The GoF design patterns are divided into three categories: creational, structural, and behavioral.
Creational PatternsĀ
This type of pattern abstracts the instantiation process of an object.
Abstract FactoryĀ
The abstract factory pattern creates families or groups of objects without knowing their implementation.
Figure 1: Abstract factory pattern
Table 1
Summary
Use Cases
Abstracts the creation logic for a family of objects into an abstract factory interface with methods whose return values are also interfaces. Concrete factories then implement the factory interface and return concrete objects from the factory methods.
- Creating groups or families of objects while hiding their instantiation details