Creational patterns
Creational design patterns - patterns for creating objects that are suitable for a specific situation.
name | description |
---|---|
Singleton | Allows to have only one instance of class. |
Factory | Interface for creating objects, that can be same type or have same parent class. |
Factory method | Method that allows sublclasses to create objects of concrete class. Factory method is also known as virtual constructor. |
Abstract factory | Interface for creating a family of related objects, without explicitly specifying their classes. |
Builder | Allows create object step by step. |
Prototype | Allows you to create an object by copying properties from the prototype object. |
Object pool | Reuses and shares objects that are expensive to create. |