Tag Archives: factory

Factory Method Pattern

According to Gang of Four: Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.  According to Wikipedia “The factory method pattern uses factory methods to deal with creating objects without specifying the exact class of object that will be created. This is done… Read More »

Abstract Factory Pattern

Definition: According to Gang of Four “Provide an interface for creating families of related or dependent objects without specifying their concrete classes” According to Wikipedia “The abstract factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes” So we can simplify Abstract Factory Pattern as follows: Abstract… Read More »