Monday, 15 January 2007

Book Review: Design Patterns

Design Patterns or Design patterns : elements of reusable object-oriented software to give it, its full title is one of those books that anyone who is using an OO language should read. Although most of the example code is written in C++ it is easy to see how the patterns themselves could be translated to other OO languages such as Java and C#.

This is the original book on design patterns, often referred to as the GOF or gang of four book (refers to its authors) it offers a wealth of knowledge accumulated from years of experience in designing software.

The book is split into two main sections the second of which is broken down further into another three sections.

The first main section is an introduction to design patterns, what they are and how they can benefit the user. This section then walks the reader through a case study designing a document editor emphasising the use of design patterns throughout. This is where the real world meets the theory and as the case study progresses you can see how by using design patterns flexibility can be added to software. It also highlights ways of recognising when a design problem can be broken down into patterns and the way at which to go about it.

The second main section of the book acts as a reference to the patterns. It is broken down into three smaller sections dedicated to each type of pattern, be it creational, structural or behavioral.

Each pattern is explained fully, giving information about how the pattern would be applied as well as where and when it would be used. Consequences of using the pattern are explained and an example implementation written in C++ is provided, this is then wrapped up by stating software that is known to use the pattern as well as listing other patterns that would accompany the selected pattern well.

With this book you are really getting two books for the price of one. First you are getting a good quality tutorial introducing the use of design patterns in a real world example and secondly you are getting a reference that you can easily use to look for a specific type of pattern when it's needed.

Once again as in my Modern C++ Design book review I would highly recommend this book to any serious programmer, it's a must have on your book shelf even if you only ever use it as a reference, and even though all of the examples are in C++ the UML diagrams included should make it easy for any OO developer to use the patterns across languages.

0 comments: