INTEGU - Factory-Design-Pattern-Overview

Factory Pattern

As arguably the most popular creational design pattern, the factory pattern provides guidelines for how to flexibly and conveniently create different objects with the same method, by only changing the method’s argument. Utilizing the factory pattern in the creation of objects allows all complexities of the creation to be hidden away. Simultaneously the factory can be designed to create any variation of an object, as long as all objects extend from the same super-class.