Abstract Factory Method Design Pattern
Abstract Factory method or Abstract Factory Design Patterns provides for creating families of related or dependent objects without specifying their concreate class. It is also knows as Kit.
When to use Abstract Factory Method:
- A system should be independent of how its products are created, composed, and represented.
- A system should be configured with one of multiple families of products.
- A family of related product objects is designed to be used together, and you need to enforce this constraint.
- You want to provide a class library of products, and you want to reveal just their interfaces, not their implementations.
Creational Design Patterns
Creational design patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented. A class creational pattern uses inheritance to vary the class that’s instantiated, whereas an object creational pattern will delegate instantiation to another object.
Creational patterns give a lot of flexibility in what gets created, who creates it, how it gets created, and, when.
There are two recurring themes in these patterns:
- They all encapsulate knowledge about which concrete class the system uses.
- They hide how instances of these classes are created and put together.
Important Topics for the Creational Design Pattern
- Example of Creational Design Patterns
- Types of Creational Design Patterns
- Factory Method Design Pattern
- Abstract Factory Method Design Pattern
- Singleton Method Design Pattern
- Prototype Method Design Pattern
- Builder Method Design Pattern