Book Reviews
This book review was submitted by a DenverJUG member as part of the Book Review Program.BOOK DETAILS
Head First Design Patterns
Authors: Eric Freeman, Elisabeth Freeman, Kathy Sierra, Bert BatesPublisher: O'Reilly
Publish Date: October, 2004
Pages: 676
ISBN: 0-596-00712-4
Publisher's Book Description
Review Date: December, 2004
REVIEWER
Hemant Kamat is an Applications Developer who has been working with Java / J2EE technologies for the last 4 years. He did his Masters in Telecommunications and is SCJP, SCWCD and SCBCD certified. He presently is a consultant on assignment in Denver.REVIEW
The Overall picture:Head First Design Patterns is another book in O'Reilly's Head First series (although not exclusively by Kathy and Bert this time) after the Java, EJB and the more recent Servlets and JSP books. It follows the same general pattern as the other books -- annoying to the more experienced and cognitive readers but tremendously informative and catchy to the tyros. This book is basically an expanded and verbose version of the GoF book. If you take the GoF book, remove some of the esoteric references, disregard all the classification information, ignore the forces and consequences and decorate each pattern with witty examples demonstrating the applicability of each pattern -- you get Head First Design Patterns. Where this book adds value is the simplicity and lucidity with which the authors try to get their point across.
Knowledge of Java or J2EE is not a prerequisite for this book, although experience in some object oriented language is de rigueur. Kudos to the authors for an outstanding job done, in their effort to explain the nuances of the more frequently used Design Patterns in an easy to understand manner and lucid manner.
Organization:
This book is pretty well organized in terms of structure and flow. The number of typos and mistakes are very few especially in comparison to the Head First EJB book. The book starts with a short introduction -- note the lack of the "meaning," "definition" and "classification" and historical references of Design Pattern (although this is mentioned briefly at the end of the book) and then it's straight into the meat of the patterns.
Each following chapter discusses one pattern starting from the Observer (Chapter 2) to the Proxy (Chapter 11). There is a brief discussion of how patterns work with one another with the MVC pattern used as an example. The book concludes with the authors providing a two-page synopsis of some of the not-so-frequently used patterns called "Leftover Patterns" ranging from the Bridge to the Visitor.
Each chapter (Pattern) starts with an example of the applicability of the pattern, followed by the definition and the class diagram and finally augmented by the use of that pattern in the example. Some of the patterns have been discussed in-depth including many of the permutations with the corresponding examples. I particularly found the chapter on the Singleton pattern pretty useful and informative albeit only a couple of pages of it were really noteworthy.
Some of the examples are downright amusing, what with their references to Mallard Ducks and Quackable Geese and New York-style Veggie Pizzas. One thing you would not be disappointed of would be the variety and sheer number of examples ranging the gamut of aerial life to edible foods. Some of them though seem to suffer from a lack of context and simplicity.
Overall each chapter does a pretty good job of explaining the basic concepts of the pattern but is bereft of the sections expostulating the consequences, advantages and disadvantages of the pattern itself.
What I liked about this book:
Each frequently used pattern is discussed to a fair extent. The examples used, in most cases, focus on the applicability of the pattern to specific scenarios. The discussions offer good FAQ-type suggestions and best practices. The language used is very simple and would make life much easier for a beginner trying to get a hold of these somewhat befuddling concepts.
One of the really good features is the healthy injection of relevant OO (object-oriented) concepts. The authors seemed to have made every effort to use / bring to the fore the OO principles at every opportunity. They have tried to tie the pattern to the appropriate OO principle wherever applicable.
What I disliked about this book :
A lot of garrulous, totally out of context passages (follows the general template of all the Head First books) spoil the tempo of the flow. One could completely do without these redundant pages: read - discussions between the Master and the Grasshopper, for example. The "frequently used" patterns could have been condensed and a little more attention given to the other "Leftover" patterns. I would have expected that each pattern would be given the same type and extent of coverage, but that's not the case. That was one of the major disappointments from my perspective. If you want to use this as a reference book, you would expect that at least all the GoF patterns be explained in some detail.
And of course, the lack of conclusions at the end of the pattern discussion -- What about the pros and cons of using the pattern? How about elaborating on the consequences of utilizing the pattern in designs in terms of flexibility? Comparison to related patterns anyone? You wouldn't find too many answers to these questions in this book. That was the only other let down.
Review synopsis:
In conclusion, I would rate this book 7.5 out of 10. In my opinion, this is a must have reference book (I would even go to the extent of saying textbook) for people who are new to the Java / J2EE world as well as intermediate developers (less than 3 years of experience) who want to understand the applicability of design patterns on a more fundamental level. This is a book they could identify with and greatly appreciate. This book is definitely not for Java architects / senior level developers -- there is nothing new / unique to distinguish it from the plethora of books already available on Design Patterns. It would be an absolute waste of time and money for people with a good understanding of design patterns.
Recommendation:
BUY / HOLD for the Beginners
SELL (DON'T BUY) for the Experienced
Disclosure: At the point of writing, I owned copies of Head First EJB and Head First Design Patterns.
