In OOP, where all things are treated as objects, it's very important to keep track of how an object is created and managed. If a developer doesn't pay much attention to this topic, the objects of the software could make the software fragile and coupled. It's important to maintain the objects appropriately to keep the application easily extendable. Creational design patterns are patterns that help create objects in a manner where the most common problems regarding object creation can be avoided.
There are two main concepts that exist in creational design patterns:
- Encapsulating knowledge about the concrete classes the system uses
- Hide creating and combining instances of the concrete classes
Creational design patterns are classified into object-creational patterns and class-creational patterns, in which object-creational patterns deal...