[Design Pattern] Creational Design Patterns

/ Design Patterns

Creational patterns provide various object creation mechanisms, which increase flexibility and reuse of existing code.

Factory MethodFactory Method

Provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.

Abstract FactoryAbstract Factory

Lets you produce families of related objects without specifying their concrete classes.

BuilderBuilder

Lets you construct complex objects step by step. The pattern allows you to produce different types and representations of an object using the same construction code.

PrototypePrototype

Lets you copy existing objects without making your code dependent on their classes.

SingletonSingleton

Lets you ensure that a class has only one instance, while providing a global access point to this instance.