Creational patterns are focused towards how to instantiate an object or group of related objects.
- Context: Deal with object creation mechanisms.
When creating an object is not just a few assignments and involves some logic, it makes sense to put it in a dedicated factory instead of repeating the same code everywhere.
-
Problem: Try to create system with less complexity to the design.
-
Solution: Controlling this object creation.