Posted By:
Luigi_Viggiano
Posted On:
Friday, January 25, 2002 07:02 AM
A factory is a class or a method that lets you to create different kind of objects implementing the same interface. The implementation is not necessary the same, and could also be unknown at compilation time.
This let the client code (using the factory and created objects) to be losely coupled with the real implementations of the interface.
When the factory returns a different implementation, the rest of the code doesn't change.