Objects by Design Forums Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home  
Objects by Design Forums : Powered by vBulletin version 2.3.5 Objects by Design Forums > Main Forums > Books > Head First Design Patterns
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
wellington
Member

Registered: Jun 2001
Location:
Posts: 37

Head First Design Patterns

Perhaps the subtitle on this book should read "Patterns for the Rest of Us".

The newest in the immensely successful Head First series published by O'Reilly, Design Patterns is written in the same tradition. If you haven't yet read one of these books, it really is a must. Kathy Sierra, founder of javaranch.com and author of several Java Certification Exams, pioneered the innovative presentation methods in these books based on research into learning theory. The basic approach is highly visual, frequently with fewer words on a page than pictures or drawings.

Design patterns is a difficult discipline, and the masterpiece that started the patterns movement, Design Patterns by Erich Gamma, et.al., is notoriously complex and has many of its examples in C++ or Smalltalk. Although there have been many attempts to emulate the original, virtually all fall short.

Head First Design Patterns, authored by Elisabeth Freeman and Eric Freeman, because of its copious and engaging Java examples and clear pictures, is therefore a breakthrough, making this difficult topic accessible to many more programmers. What is also impressive about this book is the many discussions on object-oriented design principles, such as encapsulation, inheritance, coupling, delegation, the open/closed principle and many others. Some of the Java examples include software for a pizza store and a coffee shop.

One problem I did find with the book is the example for the Decorator pattern, where condiments are used to decorate beverages such as coffee or tea. Although the example succeeds in teaching the basic principles of the Decorator pattern, one is struck by the fact that condiments are really attributes of a beverage, not a beverage themselves. The behavior of the condiments Decorator classes ends up being too simplistic to warrant being their own classes. This seems especially true when comparing this example with the authors' real-world example of the Java I/O classes, which indeed are classic examples of the Decorator pattern, and which do in fact add behavior in the process of decoration. The reader is highly encouraged to look at the Java source code for these classes, which may be found in Sun's JDK.

The description of the Template Method pattern on the other hand is very clear and convincing. The example here is... you guessed it, a coffee/tea making application, with abstract, template methods for brew() and addCondiments(), thereby allowing one base class to prepare both recipes, even though each recipe is specialized by these two methods. (It is clear from this example that a better abstraction for condiments is as attributes of a beverage.) The real-world example for this pattern is the sort method for the Java Arrays class, in this case used to sort ducks by weight.

The strong point of this book is the clear descriptions of many of the most popular patterns and their applicability to solving real-world software problems. I highly recommend it to any developers who want to put patterns to work in their own software.

If you haven't seen the other books in the Head First series, I also highly recommend the JSP and Servlets book, as well as the one on EJB.

My recommendation for a new Head First book? How about Head First Agile Software Development?

Last edited by wellington on 12-27-2004 at 02:05 AM

Report this post to a moderator | IP: Logged

Old Post 12-22-2004 04:48 AM
wellington is offline Click Here to See the Profile for wellington Click here to Send wellington a Private Message Visit wellington's homepage! Find more posts by wellington Add wellington to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 10:55 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 

< Contact Us - Objects by Design >

Powered by: vBulletin Version 2.3.5
Copyright ©2000 - 2017, Jelsoft Enterprises Limited.
Copyright 1999-2005, Objects by Design, Inc.