Design Patterns and the GoF
Few 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 Vlissides—a group popularly known as the “Gang of Four,” or GoF—sits 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access