395 of 415 people found the following review helpful
on March 7, 1997
This book really changed my way of thinking about object-oriented design. The idea is that when designing a new class hierarchy, though implementation details may differ, you often find yourself using the same kinds of solutions over and over again. Rather than approaching each design task out of context as an individual, isolated problem, the strategy is to study the task and identify the underlying design pattern most likely to be applicable, and follow the class structure outlined by that pattern. It's a "cookbook" school of design that works amazingly well.
There are other advantages to this book. It isolates 23 of the most common patterns and presents them in detail. You wouldn't think that 23 patterns would be enough, but once you become adept at recognizing patterns, you'll find that a large fraction of the patterns you use in practice are among these 23. For each pattern, the book carefully presents the intent of the pattern, a motivating example, consequences of using that pattern, implementation considerations and pitfalls, sample code (C++ or Smalltalk), known uses of that pattern in real-world applications, and a list of related patterns.
Upon first reading, you will start to recognize these patterns in the frameworks you see. Upon second reading, you'll begin to see how these patterns can help you in your own designs, and may also start to see new patterns not listed in the book. Once you become familiar with the pattern concept, you will be able to originate your own patterns, which will serve you well in the future. One of the most valuable contributions of this book is that it is designed not merely to help you identify patterns, but to give you a sense of which patterns are appropriate in which contexts.
I think this book is particularly valuable to many C++ and Java programmers, because of the dynamic and flexible design philosophy it follows. (Its two fundamental principles of reusable OO design are: "Program to an interface, not an implementation" and "Favor object composition over class inheritance".) I've found that many C++ books unfortunately tend to emphasize a rather static and inflexible design philosophy. Many C++ programmers do not realize how the language and the books they've studied from have been limiting their thinking until they have been exposed to ideas from other lanugages. The authors of this book have obviously been influenced by other languages as well, especially Smalltalk, and have brought many of its best lessons to C++ design. Most Java books seem to take after the C++ books, even though Java is a more dynamic language. This book may help Java programmers take full advantage of the extra power offered by their language, if they look deeply enough into some of the lesser-known features its runtime system affords.
Last, but not least, this book is valuable because it names the patterns it uses, and so gives programmers a common vocabulary to describe design concepts, rather than particular implementations. You'll find yourself saying things like, "That would be a good use for a Decorator", or "Should we use a Facade or a Mediator in this case?" I encourage readers of this book to use this vocabulary with other programmers.
In summary, this is one of the few books that I think belongs on every programmer's "must-have" list. Not to overuse a cliche, but like object-oriented design itself, the pattern concept is one of those rare paradigm-shifts in computer programming. It is equally valuable to expert professional and novice student alike. The book has a home page at [...]
250 of 262 people found the following review helpful
on May 15, 2000
As you probably already realize from the large number of reviews, this book is one of the seminal books on patterns in software development. If you are a professional software developer, you must read this. If you are learning to write good software, this is a book that you will need to take on at some point, but I urge some caution.
In particular, many of the patterns in this book represent highly distilled wisdom about effective solutions -- distilled so far that, unless you have implemented code that realizes the pattern in question already, you may have trouble absorbing the material. I find that programmers-to-be who dive into this book, often end up talking annoyingly about "applying patterns" without having a real grasp of how these things translate (with some distortion and compromise) into real projects.
That being said, an excellent way to bridge the gap is to read this book along with "Pattern Hatching : Design Patterns Applied" by John Vlissides. That book is a chatty companion piece for this one -- I found myself understanding how to incorporate patterns into my day-to-day design work much more after reading both books.
See: Pattern Hatching : Design Patterns Applied [also at Amazon.com]
Overall, while this book is an extremely important contribution to software developers, it is structured in a way that makes the material difficult to absorb if you aren't approaching it with substantial previous knowledge about developing software. You can start with some of the simpler patterns (Singleton, for example) and work through the harder ones, but only by implementing projects and stumbling upon these yourself will you really feel a flash of recognition as you read them in the book.
358 of 386 people found the following review helpful
on January 19, 2005
... well, it's over. "Patterns" have not revolutionized the world. Nor does this book need to be "studied" for deep insights.
What it seems patterns are actually good for is giving common names to popular solutions to problems, to make them easier to call to mind, and easier to discuss with others. Even this much is overrated. Before the advent of patterns, you could have said "callbacks" and people would have understood. Now you say "the Observer pattern".
_Design Patterns_ is none the less valuable, because it is one of those few books that EVERYONE is expected to have read. This is helpful in practice, as you can expect everyone to be familiar with its vocabulary. Few books truly fall into this "required reading" category. The only other that comes to mind is the MIT algorithms text. Many tech pundits claim that every next book is "required reading", and the claim becomes tiring after a while, but this is one of the few that really is.
I would not necessarily purchase it, though. The "pattern" schematic is verbose, and requires pages upon pages to describe something that, once you have seen it in practice once or twice, you will recognize immediately. Omitting the appendixes, the book is barely 350 pages, and presents only 23 patterns. Only a handful of the patterns are truly famous: Singleton, Observer, Template Method ... perhaps a few more. A number of them are poorly presented. Chain of Responsibility, for instance, is just one of many ways to define an event framework and does not belong in a book that doesn't present the alternatives. Mediator is another; there must be dozens of ways to create a Mediator, which most people would call an "event registry" or something else, rather than a Mediator. "Mediator" itself is little more than a name, and won't help you in design.
Some patterns are boring, since modern languages tend to provide them, and we've heard about them many times already: Iterator, Proxy, Memento (serialization). Others, like Command, are geared towards GUIs, and provide little value to other types of applications. Then there are the State and Strategy patterns, which are two sides of the same coin, and needn't be given two different names.
And so on. Definitely do not "study" this book if it seems you "just don't get it". Chances are the book is wrong. It is worth a read through, and a second read through if the terminology doesn't stick the first time, but stop at that. My gut feeling is that this book is most appropriate for someone working on his or her first large project. After that, once the terminology sinks in, the book has little else to offer. And if taken dogmatically, or considered "inspired" or infallible, the book is a hindrance. Finally, overuse of patterns can result in a "kitchen sink" design, instead of a simple one that takes a few patterns, that may or may not be ones from this book, and implements them cleanly. Take the book for what it's worth, but remain skeptical.
58 of 62 people found the following review helpful
on February 10, 2000
Obviously, this book is *the* most recognized reference work on software-related Design Patterns, and as such cannot be ignored. If you want to know about patterns, here is where to start.
The main asset of this book is in its trustworthiness and credibility - not such an easy thing to come by in computer books these days. I went through many if not most of the C++ examples in detail, and did not find a case where it didn't hold up, at least to the extent where it clarified what the point of the pattern was. The UML diagrams are also extremely helpful.
Be forewarned, however; this is not light reading. The examples are based on heavy-duty design tasks your average programmer doesn't face, like language-parsing, toolkit creation, compiler writing, and the like. It makes one wonder how applicable many of the patterns are to less complex programming tasks.
Also, most of the examples are in C++, so you really have to understand the syntax of C++ before you can get much value out of this book. Another drawback is that many of the examples are abridged, so at times you have to kind of extrapolate on what some of the code *would* look like in order to understand the examples. The chapter on Interpreter in particular was a tough nut to crack due to this. I actually would have liked to have seen *more* explanatory text associated with the code itself.
For all that, many of the patterns are pretty staightforward. The trick is to nail down that you "get it" for each pattern. One technique I found enormously helpful in accomplishing this was to write a summary of the pattern after reading a chapter - right in the book, so it can referenced later (there's often an entire blank page opposite the beginning of each chapter you can use for this). You may find yourself delving back into the chapter to confirm your understanding.
Overall, a challenging but ultimately rewarding read for anyone who wants to understand what design patterns are all about.
50 of 53 people found the following review helpful
on October 31, 2000
I've been a software developer in C++ for some time. I would have to agree with the reviews that mention that most C++ textbooks rarely show the full scope and power of what this language is capable of, until you look at modern OO languages like Java and how they have been put to use. After all, those are language textbooks, not OO design/philosophy books.
This book, on the other hand, made clear the "why" behind many software library architectures I've used, from the basic Java classes and AWT to things done in MFC, COM and the Stingray MFC extension libraries. Not only did it give an explanation, but it explicitly set out the "how-tos" on using these patterns yourself (complete with diagrams illustrating the structures and interactions), and more importantly when and when not to use particular patterns.
For me at least, the most difficult part of designing an application is not coming up with good algorithms or efficient routines, but is constructing a sensible, easy-to-maintain architecture that will hand the demands placed on it...without writing excessively convoluted code. This seems more all the more difficult the larger the application gets. The patterns in this book clarified many things which I wish I had known earlier. A few patterns that I had "discovered" through much trial-and-error and observation were set out, often in a much cleaner form than I had come up with myself. Several of the patterns in the book were immediately applicable to a project I was working on, helping to speed through what likely would have been another messy and slow design phase.
I would recommend ths book for any OO designer. At the very least, it will enable you to understand why various libraries were implemented in certain ways. At best, it will provide a useful toolkit of proven solutions enabling one to get the most out of an OO language such as C++ or Java, a toolkit that can be drawn on to solve your own architectural issues without reinventing the wheel.
The only warning I would give about this book is to reiterate the warning in the preface's very first paragraph: "This book assumes you are reasonably proficient in at least one object-oriented programming language, and you should have some experience in object-oriented design as well. You definitely shouldn't have to rush to the nearest dictionary the moment we mention 'types' and 'polymorphism', or 'interface' as opposed to 'implementation' inheritance."
48 of 52 people found the following review helpful
on August 14, 2002
From all other people's reviews, you have already known this is the classic text on the subject of design patterns. This is indisputable so I don't need to waste time trying to prove it again.
However, I would like to say something to those readers who are totally new to design patterns and C++/Smalltalk -- please do not be intimidated by the seemingly terse, dry and difficult style of this book. Since I myself am new to the world of design patterns, I would like to share with you my own experience and hope you can make a better decision when you pick your design patterns book.
"Design Patterns" is the classic text; its style is academic-oriented, rigorous, and terse. Unlike most popular computer books, you will find reading this book takes a lot of thinking, for each paragraph or even each sentence. Most examples used in this book are adapted from real world systems popular many years ago, so you will likely find you're not familiar with them at all. Moreover, some examples are related to GUI programming, so if you're mainly programming for backend, you will probably feel it's tough to understand some of the examples. Most code example in the book is written in C++ (some in Smalltalk.) If you're a Java programmer and have limited knowledge in C++, it might take you some time to guess what certain C++ syntax means.
These all seem to be negative comment, but my conclusion is to the contrary -- this is the BEST book in the area, and you should read it despite of all the issues I mentioned above. I started my design pattern learning by using a couple of other books, such as "Java Design Patterns: A Tutorial", "Design Patterns Explained: A New Perspective on Object-Oriented Design", and "Applied Java Patterns". I chose these books mainly because they seem to be much easier to understand than "Design Patterns". However, after spending time in these alternative books, I found none of them offers the accuracy and depth as "Design Patterns". Often, after I read a chapter of the "easy" book, I feel I am still kind of lost. I seem to have understood the pattern I just learned, but then I feel it's not quite so. I guess I only learned the pattern in a superficial way, with little depth, and without being part of "big picture." Later, I turned to the classic, "Design Patterns". I forced myself to sit down and try to understand the authors' terse and rigorous writing and their unfamiliar examples. Gradually I found I was getting used to the style and the examples, and I actually started to learn much more from this book than from others. After reading half-way through the book, I felt the rigorous style is actually a big plus for this book, because I can get more accurate and in-depth information.
Therefore, I strongly suggest that you buy and read this book, even if you feel it's difficult to read. Your effort will pay off eventually. Use other books as reference only.
36 of 38 people found the following review helpful
on February 6, 2001
This is absolutely one of the best books on OO design. I am a System Archtect and I can't image how my design (and Java) would look like without applying the concepts and patterns described in this book. This book, IMHO, plays a much more important role and should enjoy a much higher reputation than the UML series written by the 3 Amigos.
This book is definitely not for those who still do not understand the virtue of the concepts presented in the book. This book is not for programmer level either(although they can still greatly benefit from the book to enter the next level). The examples in the book are in C++ but the patterns it describes is language independent. Those who really know Java(not just reading sth like Teach Yourself Java in XX days,weekends,in a nutshells, etc) should tell immediately that lots of patterns are already applied in Java, especially in J2EE. Knowing the patterns in the books not only make your design step up to the next level, but now also a MUST if you want to pass the perfessional certificate exam like SCEA. I have to say no one can claim they know OO design without knowing the concepts and patterns described in this book.
This is one of those few books in computer world that will receive more and more recognization as time gose by. In three years no one will even mention 90% of those books currently getting five stars, but this one, I have to say, will be in top in foreseeable future and much longer.
I totally agree that this book is a little bit hard to read. Please think it this way, anything you can learn in 10 minutes is useless and of little market value because anybody can do the same. Those who grasp the essence missed by the majority are distinguished and of high value....
116 of 136 people found the following review helpful
on December 22, 1999
I rate this book 5 stars for the idea and -2 stars for all the confounding little mistakes. Apologize, I don't have too many details because it was one of the few books I borrowed that I actually returned (and to the original owner).
I went through two of the patterns with full concentration, found mistakes in both and found they really did get in the way. Things were named or referenced in ways that just couldn't be right. I wrote to the authors about a few issues (e.g. on pg 275, Widget should reference DialogDirector, not aggregate it) and the response (Johnson, Vlissedes) was very kind and constructive. But I believe there is significant work remaining. You may think I'm being overly picky here (at issue on pg 275 is an itsy bitsy little shape), but try understanding something completely new when there is one mistake in it. You wonder if you're comprehending wrong.
I have a hunch that most folks here, pardon my presumption, who are rating high without reservation are really in love with the idea of finding patterns to design (as am I). But I wonder if they've ever really really tried to go through any of the examples at a finer resolution than a bird's eye view. The book does a lot to crystalize the dream of reusable design patterns but not as much as it could to wake us up to realizing it.
Still it's on my list of things to buy because it's darn thought-provoking. Maybe that's it's highest purpose: to announce, if only by the title, the shocking idea that there could be patterns to design, that programmers might not always have to reinvent the universe with each project. (The idea that they don't is not new, but the *fact* that they don't is making woefully slow progress.)
The big question I still have is did they pick really good patterns and objectify them with compassion and vision? Are these the very paradigms and clumps of computational power that will be in the toolbox of programmers yet unborn? Dunno. I suspect from the tactical gaffs that strategic corrections are in order.
Maybe 3 stars isn't harsh enough but it's certainly a pioneering book. I believe one significantly better will come out in the next decade. It would be nice (somehow in my rosy view of the world) if it were by some of the same guys...
28 of 30 people found the following review helpful
on May 16, 2001
Design Patterns, referred to warmly as the "Gang of Four" book by it's fans, is the book that introduced me to the world of design patterns. After reading this book, you'll immediately see patterns from it everywhere - many classes you use every day will suddenly all fit together in a pattern.
Besides being a tool for writing good maintainable code, patterns are a crucial tool for communication among developers. Knowing even a half-dozen of the basic patterns will facilitate communication among team members immensely. For instance, you may be having a whiteboard design session with another developer or two, explaining some particular design you have in your head. Instead of having to detail 3 or 4 or more classes and how they would interact, you could simply say that you are thinking of using the Factory pattern here, and the Decorator pattern over there, and the others will know exactly what you are thinking.
The patterns are grouped into three groups: Creational, Structual, and Behavioral patterns. Each pattern is considered in turn, each having sections detailing the intent of the pattern, the motivation for using it, the consequences (both good and bad) of its application, collaboration among the objects involved, and examples.
The examples are mostly in C++ with a small dose of Smalltalk, but the patterns are equally applicable to any object-oriented language, Java in particular. Some of the patterns can be implemented even more simply and cleanly in Java, as a result of language features such as dynamic class loading, among others.
This book is well-written, and it's a quality book well worth owning. It even has two nice ribbon bookmarks attached to the binding which makes to book even more practical as well as handsome.
28 of 30 people found the following review helpful
on July 2, 1998
The authors define design patterns as: descriptions of communicating objects and classes that are customised to solve a general design problem in a particular context. A design pattern names, abstracts, and identifies the key aspects of a common design structure that make it useful for creating a reusable object-oriented design. The design pattern identifies the participating classes and instances, their roles and collaborations, and the distribution of responsibilities. Easy to wrap your mind around, eh? Design Pattern people are in love with the power of abstraction and generality. You might even say they prefer to impress rather than inform. However, somehow you are going to have to learn this stuff, even if only to get into the heads of the guys who designed the AWT. Try starting with the code samples in the Design Patterns book. You have to read this book at least twice before it begins to make any sense. However, if you want to call yourself a programmer you MUST understand this book. I hope somebody writes a version of this book for Java programmers. It is written from the perspective of C++ and Smalltalk. This is a book where the you want the hardcover version. You go back to it again and again.