According to my experience, you may use each pattern as follow:
1- The Builder pattern is concerned with building a single complex object
(by including the concept of a director that depending on different factories).
2- The Abstract Factory pattern is concerned with building families of related products (where there are many product hierarchies and a factory for each family of products).
3- The Factory Method pattern is concerned with instantiating a subclass
of one class hierarchy (where there is a specific reason why one subclass would be chosen over another).
1 comment:
This is a simple comparison.
And there are tow additional patterns:Singleton and Prototype.
I think they are clear.
Post a Comment