| Patterns
in Java
Volumes 1 & 2 Review by Billy Barron "Patterns in Java" (Wiley Computer Publishing; ISBNs 0-471-25839-3 and 0-471-25841-5) by Mark Grand attempts to be a Java-specific version of "Design Patterns" (called GoF from now). GoF is the well recognized bible on OO design patterns, but the book predates Java.The new two book series tries to have more patterns and tie them all to Java. One advantage to this approach is that some patterns make sense in Java that do not make sense in other OO language. Apparently from reading Volume 2, it appears that a Volume 3 is planned. An odd thing about this series is that the first three chapters are the same in both books. I wish they were in Volume 1 only to save me some money, shelf space and to save trees. It is true that the books gives you a large library of patterns. However, it has been discussed between myself and others that some of the patterns are not really patterns at all. For example, the so-called "Testing Patterns" have been around forever and are methodologies not Patterns. Also, they are not related to Java in any way. The explanations in this book in no way compare to the explanations found in GoF. The descriptions of patterns in GoF were pretty consistent in understandability. "Patterns in Java" was a real mixed bag. Some patterns had wonderful explanations. Others did not make sense to me even after repeated readings. Most were just okay though. Many of the code examples seem overly complex to me. Instead of just showing the patterns in isolation, the examples tend try to do something else which masks the patterns itself. Also, I saw some bugs in some of the code and others have told me the same. For example, the singleton code examples claims "If you play all audio clips through the AudioClipManager object, there will never be more than one audio clip playing at the same time." However, from looking at the code, I see a race condition that is not handled. In summary, if the book was executed properly, it would be incredibly useful to all Java programmers. However, the implementation is very flawed. It is still marginally useful in that it documents a lot of patterns that GoF does not. A second edition, which focused on improving explanations and code examples, is needed to make these books really good. |