Creational patterns let you separate the details required to instantiate an object from the architecture. Thus far, a common theme in this book has been how to architect a system that adheres to the four principles of OOP, thereby promoting flexibility. You achieve this flexibility by wrapping code in an object that provides a common interface, shared among other objects. This way, your system can include interchangeable behaviors.
The code is modeled around these interfaces, and the objects’ behaviors are usable once they’re instantiated. However, as simple as this appears on paper, many conditions in reality can ...