Design Patterns: Elements of Reusable Object-Oriented Software 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
- List Price: $59.99
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
Customers who viewed this item also viewed
This is one of the best written and wonderfully insightful books that I have read in a great long while...this book establishes the legitimacy of patterns in the best way: not by argument, but by example. -- C++ Report
There was a problem filtering reviews right now. Please try again later.
In certain situations you see how this book changed the way the field of computer science developed. Before the writing of the book the authors originally called the Singleton pattern the Solitaire pattern. They changed it last minute (explained in the Conclusion) from Solitaire to Singleton, and that is a major part of why everybody calls it Singleton today.
Some people may have an issue with the age of book. When you read the introduction, they mention that C++ and Smalltalk are cutting edge programming languages. I know C++ pretty well, but I have never used Smalltalk. What I learned from the book was how Smalltalk was fundamental to creating the MVC (Model-View-Controller) framework. In a lot of places the authors point out situations where C++ programmers would implement a pattern one way, and Smalltalk programmers might use the pattern another way.
The book's examples are mostly about text writing programs, windowing, and drawing. These examples fit well for the patterns. You can also see how the current state of programming was much different. Text editors were creating huge innovations back then.
This book requires sophistication as a programmer. It will be a challenging book for pretty much anyone to understand completely. You need to have familiarity with the word choice as well. The authors assume you are well versed in their language. The glossary was pretty good in this book, I would recommend taking a look before you start.
The progression of the book is excellent. There is a lengthy introduction before getting to the patterns. This helps put the entire book in context and prepares you for the challenge to come. Each pattern is unique in subtle ways that the authors explain masterfully.
One hundred years from now this book will still work. The patterns are fundamental to software design itself. I wish most authors were this bold.
As a good companion book, I would recommend "Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development" by Craig Larman. Larman's book gives a more gentle introduction to some of GoF patterns, explains why they are useful via GRASP guidelines and presents patterns via UML (and c# code if you like code more than diagrams) which is, in my view, much more accessible for developers who do not write code in c++. I agree that UML is outdated, but it gives a reader a good opportunity to grasp the ideas without constraints of a particular language. So two books work great together to introduce a reader to the world of good software engineering practices.
btw I recently (summer 2019) had several interviews in big tech companies in silicon valley and in 2 of them I was told that this book is a very much recommended reading for every software engineer.
While the psuedo code seems to be more tailored to C++ and qualifiers like “friend”, the author(s) do make an effort at keeping the psuedo code generic, so the patterns may be easily applied to other OOP languages like Java, C#, Python, etc.
I highly recommend this book along with Robert C. Martin’s “Clean Code” and Koopman’s “Better Embedded System Software” for any software engineer’s library!
However, we are way, way overdue for a new edition, one written using C++11/14 or modern Java for the examples. The C++98-based examples really date this book - lines and lines of code to illustrate what you'd do with a bit of STL in modern C++. The patterns themselves are still relevant, but I hope no one is taking the code examples too seriously.
This book provides a good share of wisdom about modern systems. Especially because not everything is up to date with modern standards. It teaches how the best practices about twenty years ago can withstand the judgement of time. Reading it helps understanding how big system have been made and how previous engineer designed software. Therefore reading this book can help communication in teams with various generations as well as with managers that were previously developers.
This book is not exactly for "reading": it's best use is practicing every case with a personal implementation.
Top international reviews
- Programming languages. I do vast majority of my coding in Java, sometimes I code in another JVM languages. This book provides examples in C++ and/or Smalltalk. Even more, this book was written before Java was a thing! This has to have an impact on how easy to follow are some of the examples. If you write Java 8 code, I bet you know what is the difference between external and internal iterator. At the same time, C++ friends will probably be less obvious to you, and the concept of e.g. enum-based singletons will not be mentioned at all. If only someone could write this book once again, but focus on Java-centric point of view.
- GUI-based examples. For nearly all the patterns, there is a GUI-related example. I am deeply alergic to GUI development and would appreciate more examples relating to backend functionalities.
- Didn't we evolve since then? Many of these design patterns are explicitly targetting challenges around excessive memory utilisation and other past limitations. We can do better now. Same constraints still exist, but are applicable to a very different extent. I can see people blindly following some of these patterns today in the field, with very little reflection upon the actual problem they are trying to solve. Today good programming is frequently not about making the application consume less memory, but about making it easier to understand and change. The problems we are trying to solve have changed, therefore the solutions we apply need to change as well. Keep it in mind while reading this book - not all of that is of equal value today, as it was when this book was first published. This takes us swiftly to the next point, which is...
- The pattern catalogue. While many of these design patterns are still valuable these days, there may be others which are more valuable. Just compare and contrast the builder pattern, as described in this book vs the one described many years later by Joshua Bloch.
My recommendation - read this book if you haven't done it already. Learn all the good things, just don't forget the world has moved on since then.
I've re-read this book so many times in my career and watched as it's contents went from obscure, to fad and overused reference to where I think it should always have been, an accepted classic containing great wisdom.
Study it, learn from from it, implement things they way it suggests - then learn that it is not dogmatic. Simply use it to help shape your software solutions into recognisable forms that can be maintained and evolved over time.
Every team who use object-orientation should have a copy in the office to refer to.
If you want a softer read, there is a Head First book on design patterns - but I would still recommend having a copy of this book to refer to when you want to implement and adapt a pattern in real life.
You have your structural, creational and behavioural patterns, with great advice for, for example, adapting an interface for a new class with features the old interface wouldn't have allowed; OK to me, it reads a lot like industry recognised hacking-together, but I'm told these are genuine real-World problems that you'll face in your careers and by following these patters will have more maintainable code, as future coders will recognise what your classes are doing. Even if you did have to hack it together.
One thing to note: the examples are in C++, but it translates well to any O-O language and the lessons are still valuable and there to be learned.
That's about all I can say, it's the most useful book I own.
There's still plenty to learn from this tome (the fundamentals haven't changed, after all). Just bare in mind that practicality and readability (particularly in the case of your successors) should trump "correctness" in all but the most niche high performance and academic projects.
The languages used in the examples are easily understood so they can be followed.
Not only for stand-alone desktop programs or mobile applications but for web applications also, you will find Design Patterns useful for your code. You will understand how to solve some basic logic problems with design patterns that will render your code reusable and easy to adapt it to any program you make.