Overview
Creational patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented.
Common Patterns
- Singleton: Ensures a class has only one instance.
- Factory Method: Provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.
- Abstract Factory: Lets you produce families of related objects without specifying their concrete classes.
- Builder: Lets you construct complex objects step by step.
- Prototype: Lets you copy existing objects without making your code dependent on their classes.