July 2001
Beginner to intermediate
368 pages
6h 52m
English
According to the Gang of Four, the intent of the Abstract Factory pattern is to “provide an interface for creating families of related or dependent objects without specifying their concrete classes.”[1]
[1] Gamma, E., Helm, R., Johnson, R., Vlissides, J., Design Patterns: Elements of Reusable Object-Oriented Software, Reading, Mass.: Addison-Wesley, 1995, p. 87.
Sometimes, several objects need to be instantiated in a coordinated fashion. For example, when dealing with user interfaces, the system might need to use one set of objects to work on one operating system and another set of objects to work on a different operating system. The Abstract Factory pattern ensures that the system always gets the correct ...