The Factory pattern has two main components: the Factory and the Product. The factory class is the class that renders the product class. The product class is the class containing data or functionality and is part of a series of class types that can be rendered from a factory method as an instance of an abstract type.
How: Factory pattern
Share this highlighthttp://www.safaribooksonline.com/a/design-patterns/9757/