March 2002
Intermediate to advanced
496 pages
8h 51m
English
The ABSTRACT FACTORY pattern lets you arrange for a client to create objects that are part of a family of related, or dependent, objects. The theme, or common trait of the family, such as which country the classes pertain to, may run across many classes. In this case, you may maintain parallel packages, perhaps placing each family in its own package. For GUI factories, you may not need more than one package if different “classes” of GUI components differ only in such attributes as text size and cursor type. However you organize your code, ABSTRACT FACTORY lets you provide a client with a factory that produces objects that are related by a common theme.
Read now
Unlock full access