- Shopping Bag ( 0 items )
A software design pattern is a solution to a particular computing problem. Each pattern has, in general, four parts: the pattern name, the problem to be solved, the solution provided by the pattern, and the trade-offs. Familiarity with patterns makes software design "easier," because large concepts can be dealt with using the patterns, rather than reinventing the wheel in each program.
A recent presentation on patterns comes via Addison-Wesley's Corporate & Professional imprint. The production quality of Pattern Languages Of Program Design 3, edited by Robert Martin, Dirk Riehle, and Frank Buschmann, is excellent, and the binding easily endured the two months I spent reviewing the text. Most importantly, because you'll find yourself reading the text with pen in hand, the pages are of sufficient thickness to take marginalia and highlighting without bleed-through. This is a nice book.
The editors have selected 29 papers presented at the Pattern Languages Of Programming (PLoP) '96 and EuroPLoP '96 conferences. The papers are grouped such that the book has ten parts, which range from the introductory General Purpose Design Patterns to the more ethereal Patterns On Patterns. Each part is briefly introduced by one of the editors. The book is brought to completion with a brief bio of each contributor, and an index.
A large number of people were involved with the production of this volume. Many papers are the product of a team of authors. The papers were worked into the conferences by "shepherds," whose clarifications and assistance were thankfully received by several authors. The editors invoked a large number of reviewers (a half page list). As one would expect with this many eyes reading and commenting on the text, it is in good English, with complete, declarative sentences. My personal bugbear -- typos -- are almost nonexistent.
The majority of the authors use graphics to present alternative views of their pattern. These include Booch cloud, class structure, object sequence, collaboration, and interaction diagrams. Unfortunately, the symbols used on the diagrams are not explicit in the text; the reader is assumed to be familiar with them. There is also a smattering of jargon, so I recommend that you not start your pattern education with this text. Rather, begin with Design Patterns by Gamma, Helm, Johnson, and Vlissides (Addison-Wesley, 1995), which is referenced in 33 of the 39 sections of the book. (By the way, you'll also need to know that those authors are known in the patterns community as the "Gang of Four," abbreviated "GoF.") A familiarity with James Coplien's writings also would be helpful, and you should have a reading knowledge of C++ and Smalltalk.
There is no disk or CD provided with the book. This deficiency is more than overcome by the inclusion of the authors' e-mail addresses, their web-page URLs, and several Internet list servers and news groups.
So what's new? In the Introduction, Brian Foote writes,
"What's new here is that there's nothing new here."
This is to be taken in the sense that the patterns presented in the book are not being exposed to the light of day for the first time, but rather have been used in actual working programs. Because the patterns document things that work, it is reasonable to conclude that they may work in other situations, perhaps yours. The advantage of studying published patterns is, of course, the benefit of having a few more minds applied to your problem at a minimal cost.
I found the Asynchronous Visitor pattern to be the most interesting. It corrects a problem inherent in the GoF Visitor pattern, the purpose of which is to allow one to indirectly modify a class hierarchy. After further study and argument, it has been found that the Visitor pattern introduces a dependency cycle of the base class on all its derivatives, so any additions to the Visitor class require a recompilation of the entire hierarchy. The Asynchronous Visitor pattern separates the Visitor class from the hierarchy, and hence minimizes the need for recompilation, which can be quite dear in C++ programs.
I draw two lessons from the chapter on the Asynchronous Visitor pattern:
It is a "better" pattern than Visitor. Patterns can't be applied blindly -- some experience with them is necessary. A pattern that "works" (Visitor) may not work all that well after all.
These lessons belie the stated purpose of The Software Pattern Series, inscribed on the back of the frontispiece: "Books in the series distill experience...into a form that software professionals can apply immediately." This is too hasty by at least two measures:
It takes time to assimilate and evaluate patterns merely to ascertain if they are suitable for use. It would be rare for a professional program designer to accept anything into a program immediately, since one must live with the side effects of both good and hasty decisions.
A reader therefore does well to evaluate both the patterns and the claims thereof.
Although written somewhat tongue-in-cheek, the last paper in the book, "A Pattern Language for Pattern Writing" by Meszaros and Doble, might be the easiest place to start studying the book. It shows how to put a pattern article together, and hence makes it easier to take the other papers apart.
The least useful patterns were those devoted to the process of software development, that is, how people interact to produce the stuff. These patterns are devoted to evolving frameworks, designing in teams, and testing. These papers are mostly "good advice" that has been presented at far greater length, and with greater clarity in other venues: Peopleware by DeMarco and Lister jumps to mind.
PLoPD3 is no novel. It is a difficult book to read, for you are reading the documentation and code of other programs. It is not a book to skim once and shelve. Rather, I suggest you read a paper, try to imagine how you would use the pattern, and try some of the sample code. Try to imagine some of the problems that will occur if you use the pattern. With this admittedly conservative approach, the book will take a few months to read.--Dr. Dobb's Electronic Review of Computer Books