Friday, December 28, 2007

Brief review of Spring In Action 2 -- by Craig Walls

Spring In Action (2nd edition) by Craig Walls is a pleasure to read. It's practical, direct, and leads the reader through Spring in a progressive, upward moving learning curve. Just when you had thought you now knew the neatest way to use Spring to perform a task, the book takes you higher with an even better way. This happens so consistently throughout the book, that I suspect it's a conscious learning-enhancement strategy by the author and editors. Early in the book, I was curious to know: How could this get any easier? And then in the next section there would be an even easier way!

The use of metaphor at the beginning of each chapter mentally sets the scene for what's to come. It's not left to chance. And the extended (but easily digested) examples using knights, quests, minstrels, jugglers and related metaphors enchant and amuse the reader while quietly driving the lessons home clearly and concisely.

Chapter 16 Integrating with other web frameworks provides up-to-date integration tips and techniques for the usual suspects, such as Struts 2 and Tapestry, finishing with DWR. This was my first contact with DWR (Direct Web Remoting), which is a Java framework that outputs to JavaScript and under the hood uses XMLHttpRequest to communicate with the server.

Spring In Action 3rd edition, when it is written, will likely follow DWR with a section on GWT (Google Web Toolkit) which does this and much more. See Google Web Toolkit: Build AJAX apps in the Java language. I am using GWT to write an internal corporate web application that displays images. Users are astonished at how fast it is compared with its non-Ajax predecessor. And I have to say it's pure pleasure to write Java in Eclipse and have a web application with all the necessary event handling, JUnit testing, refactoring, and cross-browser compatibility.

And I daresay there will be a further section on integrating Spring with Groovy and Grails. Actually, Spring is already integrated with Grails. Groovy and Grails are in an accelerating ascent, based on the Java ecosystem in style and substance, and with other proven scripting languages and application stacks such as Ruby and Rails for inspiration and learning. Groovy and Grails are such a great set of ideas, that they are bound to take off in a big way. I enjoyed watching some of the Grails eXchange 2007 conference presentations, and listening to some podcasts. These are well worth your attention and thought. Groovy and Grails still have their rough spots: the Grail needs a little more polishing. But their current use in production applications at such a young age suggests they have an impressive future ahead of them.

You may also wish to check out the 2G Groovy / Grails Experience 21-23 February 2008 for future developments.