While patterns are an inherent part of the human experience, using them in software development is a recent phenomenon. The seminal event was the publication of the book, "Design Patterns: Elements of Reusable Object-Oriented Software", by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. A Group so well-known that they are commonly referred to as the "Gang of Four," or GoF for short.
A design pattern is a metamodel for a solution. However, being a solution to a set of conditions common to many different problems, design patterns are very hard to learn. Even the GoF admit this in the preface of their book. "Don't worry if you don't understand this book completely on the first reading. We didn't understand it all on the first writing!" There are two fundamental reasons for this. The first is that the identification of a design pattern requires that one recognize a common abstraction among a set of abstractions. There is principle about great mathematicians that applies here. " The great mathematicians find analogies among analogies." The second is that our brains are very efficient at finding patterns. Unfortunately, those found are often ones already cataloged. Presented with a partial pattern, our minds automatically do a great deal of curve fitting to create a complete image matching one already known. Therefore, it is all too easy to find a pattern that we are familiar with, rather than the one that is present. Making the subject even more complex is that patterns are not distinctive entities. Some are constructed from other patterns, others are instances of a specific pattern, and many patterns share common characteristics. Being of recent vintage, there is no well-defined language available to describe patterns. Furthermore, not all patterns currently in use have been explicitly described.
As the name implies, the book being reviewed here is another volume in a series of collected works. In this case, the components are the best papers from PloP '96 and EuroPloP '96. They are of course of the highest quality, which means that intensive study is a precondition to understanding the book. Many new patterns are described, although at times one gets the impression that the word pattern is being overused. Without clear guidelines as yet for the precise use of the word in this context, this is expected. Very few of the patterns are described at the computer-code level, which is very good. Computer code, even when it is kept generic, eliminates some of the abstract qualities of what a pattern is designed to do. The pattern descriptions are given in the generic form: Intent, Motivation, Applicability, Structure, Participants, Collaborations, Known Uses, and Related Patterns.
This format allows for an understanding of all facets of the pattern, from the why of creation to how it fits into the dictionary of known patterns. The range of problems solved by these patterns is substantial. Some sample patterns are: Null Object, Bureaucracy, Bodyguard, Serializer, and the Selfish Class. In the final chapter, patterns on Patterns, an additional, important step up the metalevel hierarchy is taken. A definition and description language are described, although sentences like, "Patterns for making patterns Understandable contains patterns that capture techniques for making your patterns and pattern languages easier to read understand, and apply," require a great deal of thought. Patterns provide a series of levels of design structures that expedite the reuse of solutions, with code reuse being a direct consequence.
As more patterns are discovered and refined, and the description language is formalized, they will become the "gold standard" of software development. Learning what they are and how of implement them will become a highly valued skill. There are many nuggets to be mined from this book. However, be prepared to go slow and occasionally be discouraged.
Published in Journal of Object-Oriented Programming, reprinted with permission