Wednesday, October 28, 2015

Abstract Factory

The Abstract Factory Pattern is to let an object manage the creation of the objects. It is often mixed up with Factory Method Pattern. The difference is that Factory Method delegates this role to a method. In a way, we can say that Abstract Factory Pattern implements Factory Method.

So what's the difference with a Factory Method pattern :

* To modify the factory of an client object we should :
** override (or inherit and implement) the factory method with Factory Method pattern
** instanciate the new factory in the client object with Abstract Factory Method


Post a Comment

Note: Only a member of this blog may post a comment.