| |
| |
Design Patterns: Elements of Reusable Object-Oriented Softwareby Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Reading, MA: Addison-Wesley, 416 pages, $37.75. Contact: (800) 822-6339. Book Review by Tom DeMarcoDesign Patterns: Elements of Reusable Object-Oriented Software is the long-awaited software equivalent of Chistopher Alexander's book, A Pattern Language [1]. Because the two books are so akin, a brief description of Alexander's work may help the reader understand why this new book by Gamma, Helm, Johnson and Vlissides promises to have an important and lasting impact on the discipline of software design. By the time A Pattern Language came along, Alexander was already a cult figure among software designers. His earlier Notes on the Synthesis of Form had called attention to some key abstractions governing the design of nearly anything. We hadn't been quick in our field to note these abstractions ourselves, and so it took an outsider to instruct us. That work was, for me at least, a near religious experience. The successor to Alexander's Notes was a three volume work entitled The Timeless Way of Building. As the title suggests, the books were concerned with trends that had proven timeless in architecture as well as in design in general. While all of Timeless Way is fascinating it was the central volume called A Pattern Language that most intrigued software people. In that work, Alexander and his co-authors described a series of 253 prototypical patterns observed in well designed buildings. One of the these, for example, shows how intimacy gradients govern a passage from the exterior of a building to its innermost (private-most) parts. This pattern holds true in the architecture of virtually all cultures and always has. The pattern description goes on to discuss why architects are lead to this strategem, what problems it solves, what variants have been investigated, what the effect of ignoring the pattern might be. The essay with one or more pictures illustrating its holding helps the reader nail down a reusable abstraction about successful architecture. This reusable abstraction is what Alexander calls a "pattern." From the time of arrival of A Pattern Language, software people began to speculate about what might be a meaningful (even timeless) set of patterns for well designed software. Mean while Bill Curtis and his cognitive psychology group at MCC had begun an extended speculation on the thought processes used by expert software designers. This inquiry and its resultant papers (see [2] for example) also relied heavily on the idea of patterns. There was a more and more general consensus that patterns for software design did exist, but what were they? Finding a workable set and putting it forth in book form proved a daunting task. From 1991 on there were Patterns meetings and workshops associated with the various OOPSLAs, and by 94 a conference dedicated to Pattern Languages of Programs. The four co -authors of Design Patterns were perennial participants in these affairs. Their new book is an extension of work begun by Erich Gamma as part of his PhD program and published as his thesis in 1992. Since so much of our community was aware of Gamma and his "gang of four" and of their ongoing work on patterns over this extended period, it's not a complete surprise that Design Patterns has finally appeared. It's not a surprise either that it does succeed to a substantial degree in providing Alexandrian pattern guidance to software designers. But the book does contain a few surprises, all of them pleasant. For starters, it has the best first chapter of any technical book I've read in a decade. This chapter is an important asset because it makes the thesis of the book accessible to managers and outsiders who may well never really understand the Hows of pattern use that are developed in later chapters. Even for those who have long been Object advocates, it may come as some surprise that the vocabulary of object orientation works so well for a discussion of reuse in the abstract. The first chapter is an elegant and unique treatise on reuse in all its kinds and flavors. It provides the reader a new way to think about this matter. The taxonomies it develops of reuse and reuse strategies (section 1.6) were, in my opinion, worth the price of the book by themselves. The second chapter builds on this fine beginning by getting right to the heart of the matter: It provides one long, meaty example of design patterns in use. The rest of the book is a catalog of the patterns proposed. Because Design Patterns bills itself as being concerned with object oriented software alone, I fear that software developers outside the object community may ignore it. This would be a shame. This book has something for everyone who designs software. All software designers use patterns; under standing better the reusable abstractions of our work can only make us better at it.
[1] Alexander, C., S. Ishikawa, M. Silverstein with M. Jacobson, I. Fisksdahl-King, S. Angel. A Pattern Language. New York: Oxford University Press, 1977. [2] Guindon, R., H. Krasner and B. Curtis, "Breakdowns and Processes During the Early Activities of Software Design by Professionals. Empirical Studies of Programmers: Second Workshop. Norwood, NJ: Able Publishing Corp., 1987, pp. 65-82.
|