What is the Factory Method Pattern?
When a class cannot anticipate the exact type of objects it needs to create, the Factory Method Pattern provides a way to delegate the object creation logic to subclasses. This is particularly useful when the creation logic is complex or when the system needs to be independent of how its objects are created and composed.
First, separate object creation from object usage. Second, allow subclasses to alter the type of objects that will be created without changing the client code. Third, promote loose coupling by reducing the dependency on concrete classes.
If you only have one concrete product type and no variation is expected, Factory Method adds unnecessary complexity. In such cases, direct instantiation is simpler and more appropriate. Use Factory Method only when you anticipate multiple product variants or when subclasses need to customize object creation.