CSC/ECE 517 Fall 2009/wiki3 16 AD: Difference between revisions
Line 10: | Line 10: | ||
== Comparison with other Creational Patterns == | == Comparison with other Creational Patterns == | ||
=== Comparison with Singleton === | === Comparison with Singleton Pattern === | ||
=== Comparison with Builder Pattern === | |||
=== Comparison with Prototype Pattern === | |||
=== Comparison with Abstract Factory Pattern === | |||
== In depth Analysis == | == In depth Analysis == |
Revision as of 03:43, 18 November 2009
Definition
Factory Method is a creational pattern. This pattern helps to model an interface for creating an object which at creation time can let its subclasses decide which class to instantiate.It is called as Factory Pattern as it is responsible for "Manufacturing" an Object. It helps instantiate the appropriate Subclass by creating the right Object from a group of related classes. The Factory Pattern encourages loose coupling by eliminating the need to bind application-specific classes into the code.
Overview
This topic deals with the Factory method design pattern.It explains Factory design pattern and compares with other creational pattern to highlight the uniqueness and distinguishing features of the pattern.It also gives examples of where factory design pattern is used and scenarios wherein its more suitable than other creational patterns.