|
The GoF Design Patterns
The Abstract Factory Method Design Pattern
Consequences
27
▶ Abstracts away from concrete products"
(Clients can be ignorant about concrete products they are using,
even at creation time.)
▶ Exchanging product families is easy"
(Changing one line can completely swap the behavior of a whole
product family.)
▶ Ensures consistency among products"
(As family selection is concentrated to one line, one may not
accidentally mix product types.)
▶ Supporting new kinds of products is difficult"
(Adding new products involves changing the abstract factory
and all of its subclasses.)
▶ Creation of objects is non-standard "
(Clients need to know to use the factory rather than a
constructor.)