Creational Design Patterns

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 snother object.
  • These patterns become important as systems evolve to depend more on object than on class inheritance.
  • There are two recurring themes in these patterns. First, they all encapsulate knowledge about which concrete the system users. Second, they hide how instances of these classes are created and put together.
  • Consequently, the creational patterns give you a lot of flexibility in what gets created, who creates it, how its get created and when.

Types Of Creational Patterns:

  1. Singleton
  2. Factory
  3. Abstract Factory
  4. Builder
  5. Prototype