22 of 25 people found the following review helpful
The best way to really learn object-oriented design,
By A Customer
This review is from: Design patterns : elements of reusable object-oriented software (Hardcover)
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 [...]
Tracked by 1 customer
Sort: Oldest first | Newest first
Showing 1-1 of 1 posts in this discussion
Initial post: 9 Nov 2011 19:05:27 GMT
' 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. '
If I started saying things like "Should we use a Façade or a Mediator in this case?" around the office, I would be accused, perhaps rightly, of being a douche-nozzle.
‹ Previous 1 Next ›