Glossary

Factory Pattern

Factory is a pattern that encapsulates object creation logic. Instead of new ConcreteClass() scattered throughout the code, you call a factory that decides which class to instantiate. The client code does not know how the object is created.

Variants

When useful