About this document
Factory Method Design Pattern Explained is a document available to read on EtoBox.
The Factory Method pattern defines an interface for creating an object but lets subclasses decide which class to instantiate. It avoids duplication of code for object creation by defining a separate factory method that subclasses can override to specify the type of product to create. This pattern relies on inheritance as object creation is delegated to subclasses that implement the factory method.
- Language
- EN