4.1. Design Patterns and the GoFFew ideas in software design have been as influential as that of the design pattern. The book Design Patterns: Elements of Reusable Object-Oriented Software (Addison Wesley, 1995) by Gamma, Helm, Johnson, and Vlissidesa group popularly known as the "Gang of Four," or GoFsits on numerous developers' desks and has permeated the design sense of the entire object-oriented development community. The GoF's book is a catalog of 23 patterns related to the creation of objects (for example, the Abstract Factory Pattern), the structural relationships of objects (for example, the Façade Pattern), and the behavior of objects (for example, the Chain of Responsibility Pattern ). Each pattern is documented according to a standard template, with sections such as Intent, Motivation, and Known Uses. The specification of a pattern describes the nature of the pattern, why it is important, and how it is implemented. The Façade pattern , for example, defines a simplifying interface to a system. Its benefits include reduced complexity and weaker system coupling, and it is useful in the design of client-side interfaces. The implementation of Façade is normally an object (such as a Compiler) whose public interface is simpler than, and hides of the use of, the set of objects (such as Scanner, Parser, or CodeGenerator) belonging to the system behind the scenes. Prior to the GoF's book, most software developers had at best a vague awareness of the concept of façade, and their ability to design a good client-side interface was a matter of good intuition. Subsequent to the book, design intuition gave way to name-dropping: developers proudly proclaimed that their interfaces were GoF façades! Good object-oriented design ideas had infiltrated the design community. |