Author: singhhome | Posted on: 5/16/2008 12:21:58 AM | Views : 450

As per GoF

Abstract Factory: provide an interface for creating families of releated or dependent objects without specifiying their concreate classes.

� 

Factory method: Define an interface for creating an object, but let sublcasses decide which class to instantiate.

� 

What I understood:

1. Factory in general is to "take out the responsibility of object creation and initalization out from client code to a common place".

� 

2. As with any pattern, there can be variations based on actual need. There can be various� ways in which factory based solution can be implemented.

� 

3. Static factory creator method should not be used, because being static it can't be changed/modified/extended. But if the static method picks info from some other source(like config file), ...

Go to the complete details ...