Core J2EE Patterns
Best Practices and Design Strategies, By Deepak Alur, John Crupi & Dan Malks
|Value for money||7/10|
|Did it do what it said on the box?||6/10|
A good book, but with a shorter book trying to get out
This is a good book, but with a shorter book trying to get out.
I’ll be honest, I was really was looking for a book called something like "Enterprise Java for an Architect who knows a lot about Microsoft DNA but not much about Java". This is the closest I’ve found. It is a very good presentation of how the different elements of the J2EE stack are meant to
fit together, common problems and patterns which address them.
There are some very good things about this book. It really tries to explain the design forces which lead to good and bad solutions, and does try to put all the different patterns into the context of a "roadmap" so you can see how they link together. One of the best ideas in the book is actually in the epilogue, where the authors introduce the idea of building an architecture via a UML diagram built from stereotypes for the patterns. I can see this being widely adopted as a useful technique.
The big problem with the book is it is dreadfully repetitive. It’s not sure whether it’s a textbook, a reference book or a design tutorial, so it tries to be all three. The same text gets repeated over and over again, not only between sections but even within a section. By attempting to make each pattern, and each
"strategy" within a pattern self-sufficient there’s an awful lot of repeated text, sometimes even on one page. Some patterns almost exact copies of one another and should arguably be strategies for a single pattern. Text is often repeated between the "Problem", "Forces" and other
sections of the same pattern, where a better trade-off would be references to a single list of more detailed descriptions. At the same time there are too many self-references in the text, even back to the start of the same section!
I found the repetition and overlap between the "design considerations", "bad practices" and "refactoring" sections confusing – it would be better if they all formed part of a single roadmap with the main set of patterns. There’s an established concept of "Anti-patterns", which could easily serve for bad practices and refactoring ideas, and these could also be reflected as part of the "forces" for the patterns.
Adopting all of these patterns could lead to a very complex layer structure, with a great many classes involved in the simplest task. Several patterns seem to be about wrapping the complexities of J2EE, and you wonder whether there ought to be a more systematic solution to this. The book doesn’t discuss
"managing complexity in the design", but if it did it might come up with some simplifications.
While I’m not aware of an equivalent book with a Microsoft focus, with a little effort you could also apply many of these patterns in the Microsoft world. However, there are some good Visual Basic patterns books which show how this should have been written. A provocative idea – does the difference between this and equivalent VB books reflect the difference in productivity of the languages?
My advice? If you need a good J2EE design pattern reference buy this book, but don’t try to read it cover to cover.