Factory Method
← Back to Creational Patterns
Delegate instantiation to subclasses. Define an interface for creating an object, but let subclasses decide which class to instantiate. Decouples client code from concrete classes.
Key Properties
Related
- Abstract Factory (family of related objects)
- Open-Closed Principle (extend without modifying)