Book Review: "Design Patterns" by Erich Gamm et al

Design Patterns by Gamma et al has been a bestselling programming book for the last 10 years. It is often said that every serious programmer needs a copy of this book. Once you open it, you will quickly learn why. It tells you how objects interact and solve programming problems. When you learn a programming language, you write code by thinking in terms of keywords: which keywords are most suited to solve a problem. As you get more experienced and use language syntax automatically, you start thinking in terms of functions: which combination of functions would be best suited to create an application. As you work on more and more complex applications, you start thinking in terms of objects that form these applications. Since every object consists of dozens of functions, properties and fields, thinking in terms of objects is convenient when you are designing or reviewing complex  object oriented code. Objects give coarse granularity when analyzing hundreds of thousands of lines of code.

Thinking in terms of objects is not just a convenience - it is a fundamentally different level of programming. It turns out, that objects are created to perform business tasks and, to an extent, are independent from the programming language they are written in. This means that you can take a business problem and completely model it out in terms of objects and their interactions! This is great, but there is more. A computer performs a handful of tasks and each task can be described through a handful of objects. This means that ANY PROGRAM CAN BE WRITTEN BY USING A HANDFUL OF WELL KNOWN OBJECTS AND THEIR INTERACTIONS. Objects and their interactions are forming so called patterns that Gamma et al have documented and classified At design stage, you should use this book to determine which patterns will be implemented in the applications. At review ("reverse engineering") stage, you can compare patterns in the book with the patterns in the code and track down possible logical error.

Design patterns offers a way to manage complexity of a large project by understanding and improving interactions between different objects in the project. The authors went through code of different applications and identified patterns of interactions between objects in these projects. The authors separate Patterns into Creational, Structural and Behavioral and provide a detailed description of what each pattern does and when to use it. Every pattern has implementation in C++ and extensively documented.

This book needs updating, but obsolete material (Smalltalk code samples, references to long obsolete Unix software) is not obstructing key points of the book.

Recommendation: Buy and Read.


Copyright© 2004-2006 Aleksey Nudelman