July 2001
Beginner to intermediate
368 pages
6h 52m
English
The Abstract Factory is used when you must coordinate the creation of families of objects. It gives a way to take the rules regarding how to perform the instantiation out of the client object that is using these created objects.
First, identify the rules for instantiation and define an abstract class with an interface that has a method for each object that needs to be instantiated.
Then, implement concrete classes from this class for each family.
The client object uses this factory object to create the server objects that it needs.