Friday, April 22, 2011

************Factory pattern************
When to use
If you have many objects of the same base type and you manipulate them mostly
casted to abstract types you can use factory Pattern

Advantage : It hides the actual classes which will implement the product

Disadvantage: if we add a new concrete product call, we should modify the Factory class.
It is not very flexible and