Creating an object can sometimes be a complicated operation, especially if we are dealing with a complicated hierarchy of interdependent objects. Patterns can introduce order into chaos in such situations.
In this chapter, we'll look into four more patterns from the creational group. You will learn about the following:
- A factory method pattern that simplifies the creation of dependent objects
- An abstract factory pattern that functions as a factory for factories and creates whole families of objects
- A prototype pattern that produces perfect copies of objects
- A builder pattern that separates instructions for creating an object from its representation