REVIEW - Design Patterns Java Workbook


Design Patterns Java Workbook


Steven John Metsker


Addison-Wesley Professional (2002)




Omar Bashir


August 2007



Positives A must read book for intermediate Java programmers who are increasingly moving into or involved in module-level design. A very interesting book for all Java developers and pattern practitioners as it presents an alternative classification of patterns.

Negatives Verbose with unnecessary details at times. Demonstrates the application of patterns using a complicated example from a rather specialised domain.

When faced with a design problem, prudent developers normally spend a considerable time trying to figure out which pattern to use. Implications of using inappropriate patterns range from an inflexible design to complicated control flows resulting in a rigid and brittle implementation. This book will help developers in answering the which pattern question.

Authors present an alternate and a finer grained classification of GoF's patterns that may help developers chose the right patterns for their design problems. Instead of the 3 classes presented by GoF (Creational, Behavioural and Structural), this book presents 5 classes. These are Interface, Responsibility, Construction, Operation and Extension. Patterns have been classified through their intents and in some cases, the authors have had to provide a deeper interpretation of the pattern intents to justify this classification and the inclusion of patterns in their respective classes. This finer grained classification helps map a particular design problem to an appropriate class, from where it is relatively easier to find the right pattern.

While being structured, the book has an informal expression that may make it easier for some readers. The book contains numerous exercises or challenges, solutions to which are provided at the end of the book and are helpful in practising the concepts explained in the book. Where a pattern being discussed is similar to other patterns, authors discuss the circumstances where one would be more applicable than others. Rather than simply demonstrating the implementation of patterns using Java as a programming language, authors go to some length in explaining classes and interfaces available as a part of J2SE that provide the basis of implementation of some patterns within a Java application.

The book mostly uses examples from a single, rather more specialised, application domain of firework manufacturing and operation. Because this is a relatively specialised domain, authors have had to provide a significant amount of domain knowledge in the book. This has made the book a bit lengthy and requires the readers to understand the domain before understanding the problem the example attempts to solve. It may not be possible for many readers to deal with two unknowns concurrently. It would have been better to use an example from a relatively more familiar application domain.

The description of some patterns in this book deviates slightly from the GoF's description. This particularly relates to pattern participants and their relationships. A typical example of this is the description of Mediator. This necessitates reading this book in conjunction with the GoF's Design Patterns book where the participants and their relationships promote a higher degree to reusability and flexibility. Finally, a couple of patterns, namely Facade and Builder have not been explained adequately. The example to explain the Facade does not highlight the advantages of using a Facade.

I would recommend this book. The finer grained classification makes the application of patterns more intuitive for developers. Implementation of patterns in Java has been adequately addressed. However, a study of patterns as described by GoF is also required in conjunction with this book. GoF's book provides an in depth description of the individual patterns whereas this book classifies them appropriately that helps developers select suitable patterns for the design problems they encounter. Furthermore, this book explains the implementation of these patterns in Java, which will be helpful for junior and intermediate-level Java developers.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.