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

Similar Reads

Example of Creational Design Patterns

Building a maze for a computer game, the maze and the game will vary slightly from pattern to pattern. We ignore what can be in a maze and whether a maze game has single or multiple players. Instead, we just focus on how the maze is created. We define a maze as a set of rooms, a room knows its neighbors; possible neighbors are another room, a wall, or a door to another room....

Types of Creational Design Patterns

Factory Method Design Patterns Abstract Factory Method Design Patterns Singleton Method Design Pattern Prototype Method Design Patterns Builder Method Design Patterns...

Factory Method Design Pattern

Factory Method or Factory Design Patterns also known as virtual constructor, it define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses....

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....

Singleton Method Design Pattern

Singleton Method or Singleton Design Patterns ensure a class only has one instance and provide glocal point of access to it....

Prototype Method Design Pattern

Prototype method or Prototype design patterns it specify the kinds of objects to create using a prototypical instance and create new objects by copying this prototype....

Builder Method Design Pattern

Builder Method or Builder Method Design Patterns it separate the construction of a complex object from its representation so that the same construction process can create different representations....