Summary
Patterns remain one of the most important new technologies contributing to software engineering, system design, and development. All indications are that patterns will continue to grow in significance as more and more developers rely on reusable design patterns to help them achieve quick, cost-effective delivery of applications. This volume is a collection of the current best practices and trends in the patterns community. The patterns contained in this book provide effective, tested, and versatile software design solutions for developers in all domains, institutions, and organizations. The third in a series of books documenting patterns for professional software developers, this volume continues the tradition of informational excellence established by the first two volumes. Pattern Languages of Program Design 3 differs from the previous two volumes in that it includes international submissions, gathering the best papers from both PloP '96 and EuroPLoP '96. It covers a wide range of pattern-related subjects, and patterns are arranged by topic so software engineers can easily select those of greatest relevance to their needs and application domains. This book goes beyond teaching software engineers that design patterns are powerful tools to impart understanding--it shows where and when patterns are best applied. 0201310112B04062001
Author Biography
Robert C. Martin has been a software professional since 1970 and an international software consultant since 1990. He is founder and president of Object Mentor, Inc., a team of experienced consultants who mentor their clients in the fields of C++, Java, OO, Patterns, UML, Agile Methodologies, and Extreme Programming.
Dirk Riehle is a software engineer at Ubilab. He is involved in the Geo project, which is setting up a reflective distributed object-oriented software architecture.
Frank Buschmann is a software engineer at Siemens, where he focuses on object-oriented technology, software reuse, and patterns. He is a member of the ANSI C++ standards committee.
Table of Contents
Introduction: Hybrid Vigor and Footprints in the Snow |
|
ix | (6) |
Preface |
|
xv | |
Part 1 General Purpose Design Patterns |
|
1 | (88) |
|
|
5 | (14) |
|
|
|
|
|
|
19 | (10) |
|
|
|
|
|
|
29 | (18) |
|
|
|
|
|
|
|
|
|
|
47 | (20) |
|
|
|
|
|
|
|
|
|
|
67 | (12) |
|
|
|
|
|
|
79 | (10) |
|
|
|
|
Part 2 Variations on Design Patterns |
|
89 | (54) |
|
|
93 | (12) |
|
|
|
|
|
8 Default and Extrinsic Visitor |
|
|
105 | (20) |
|
|
|
|
|
|
125 | (18) |
|
|
|
|
|
|
|
|
Part 3 Architectural Patterns |
|
143 | (44) |
|
|
147 | (16) |
|
|
|
|
|
|
163 | (24) |
|
|
|
|
Part 4 Distribution Patterns |
|
187 | (104) |
|
12 Acceptor and Connector |
|
|
191 | (40) |
|
|
|
|
|
|
231 | (14) |
|
|
|
|
|
|
|
|
|
14 Asynchronous Completion Token |
|
|
245 | (16) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 | (16) |
|
|
|
|
|
|
|
|
|
|
|
|
|
16 Patterns for Logging Diagnostic Messages |
|
|
277 | (14) |
|
|
|
|
Part 5 Persistence Patterns |
|
291 | (54) |
|
|
293 | (20) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 Accessing Relational Databases |
|
|
313 | (32) |
|
|
|
|
|
|
|
|
Part 6 User Interface Patterns |
|
345 | (14) |
|
19 A Pattern Language for Developing Form Style Windows |
|
|
347 | (12) |
|
|
|
|
|
|
|
|
Part 7 Programming Patterns |
|
359 | (32) |
|
20 Double-Checked Locking |
|
|
363 | (14) |
|
|
|
|
|
|
|
|
|
|
377 | (14) |
|
|
|
|
|
|
|
|
|
|
|
|
Part 8 Domain-Specific Patterns |
|
391 | (56) |
|
22 Business Patterns of Association Objects |
|
|
395 | (14) |
|
|
|
|
|
23 A Pattern Language of Transport Systems (Point and Route) |
|
|
409 | (22) |
|
|
|
|
|
|
|
|
|
24 The Points and Deviations Pattern Language of Fire Alarm Systems |
|
|
431 | (16) |
|
|
|
|
|
|
|
|
Part 9 Process Patterns |
|
447 | (80) |
|
|
451 | (20) |
|
|
|
|
|
|
|
|
|
26 Patterns for Evolving Frameworks |
|
|
471 | (16) |
|
|
|
|
|
|
|
|
|
27 Patterns for Designing in Teams |
|
|
487 | (16) |
|
|
|
|
|
28 Patterns for System Testing |
|
|
503 | (24) |
|
|
|
|
|
|
|
|
Part 10 Patterns on Patterns |
|
527 | (48) |
|
29 A Pattern Language for Pattern Writing |
|
|
529 | (46) |
|
|
|
|
|
|
|
|
About the Authors |
|
575 | (10) |
Index |
|
585 | |
Excerpts
This is the third in the series of PLoPD books; and it represents something of a departure from the previous two. This is the first book in the PLoPD series in which fewer than half of the papers submitted at the corresponding PLoP conferences have been published. This is also the first PLoPD book in which papers from more than one conference have been published. There were over 80 papers submitted to PLoP '96 and EuroPLoP '96 and there was no way that we could publish them all. Therefore we had the unhappy task of deciding which of those papersnotto publish. This task was not easy since all the papers submitted were of very high quality (Something we have come to expect from the PLoP conferences). Fortunately, our burden was lightened by all the folks who helped out with the review and selection process. The process of creating this book.We recruited a veritable army of reviewers, and each of the 80+ papers was reviewed by three of them. The reviewers' recommendations were then passed on to the three editors (Dirk Riehle, Frank Buschmann, and Robert Martin). Then began a rather long and heated exchange between us. None of us had any problem being choosy; and, indeed, the three of us settled on a large core of papers to be published. But there were a few papers that we did not agree upon. And thereupon laid the long and arduous process of defining the final contents of this book. None of us think that this book is perfect; but all of us think that it is a top-notch collection of superb papers.What were our selection criteria? The choice of papers was constrained by our target audience:software engineers. First and foremost the papers in this volume had to be of interest to this audience. Although patterns about music are interesting to musicians, we did not think that they should be included here. Secondly, the papers had to be of practical value to our audience. Although papers of abstract theory are certainly interesting, we gave preference to papers that provided techniques or tools that would be of immediate use to our audience. Finally, the papers should be patterns. There were lots of good papers that were written about software engineering, but we gave preference to those that described patterns related to software engineering.To be sure, these criteria were not unambiguously stated up front. Like all high quality projects, the requirements evolved during development. It was during the book definition process that we learned about each other's expectations and visions for the book. And it was during this process that our own expectations and visions were changed through discussion and argument. All in all, it was a very rewarding, if somewhat exhausting, experience.In the spirit of Ralph Johnson's suggestion to catalog patterns as design specimens, just like biology catalogs and classifies its animal and non-animal specimens, we organized the book by topic. It comprises general design patterns as well as patterns for specific technical or business domains. It also contains patterns for designing user interfaces, and helping with software processes; it even contains a chapter with patterns for writing patterns. We did not distinguish between patterns and pattern languages, but focussed on putting together patterns by topic so that you can take a look and see whether these patterns are of interest to your needs and your application domains. Design Patterns, a 1997 perspective.It has been two years since the publication of the GoF book. During that time interest in design patterns has increased at a phenomenal rate. Today it is very unlikely that any serious software is ignorant of the concept of design patterns. There are major magazines that run regular columns about design patterns. The C++ Report runs a monthlysectionabout design patterns. There are several other books by major authors that have been published on the topic of design p