Creational Pattern

The basic form of object creation could result in design problems or added complexity to the design. Creational design patterns solve this problem by abstracting the instantiation process.

First, they all encapsulate knowledge about which concrete classes the system uses. Second, they hide how instances of these classes are created and put together. All the system at large knows about the objects is their interfaces as defined by abstract classes.

They give a lot of flexibility in what gets created, who creates it, how it gets created, and when.

    • Abstract Factory

Creates an instance of several families of classes.

    • Builder

Separates object construction from its representation.

    • Factory Method

Creates an instance of several derived classes.

    • Object Pool

Avoid expensive acquisition and release of resources by recycling objects that are no longer in use.

    • Prototype

A fully initialized instance to be copied or cloned.

    • Singleton

A class of which only a single instance can exist.