Book review: Grails A Quick-Start Guide

Z Jacek Laskowski - Wiki Projektanta Java EE

Grafika:grails-aquickstartguide_cover.gif Grails A Quick-Start Guide by Dave Klein (Pragmatic Bookshelf, October 2009)

There was so much pleasure to read Grails A Quick-Start Guide by Dave Klein. After those other Grails books I had already read (Grails 1.1 Web Application Development, Grails in Action, The Definitive Guide to Grails, Second Edition and Beginning Groovy and Grails: From Novice to Professional) Grails, A Quick-Start Guide turned out to be the best for Grails newcomers who are keen to start developing Grails applications right from the very first page. Even though it took over 200 pages and just scratched Grails' surface I think any Grails practitioner will find something interesting for oneself, be it for the writing style of Dave Klein or Grails' goodies he was able to present without more ado. I enjoyed it so much that I read it from cover to cover in a blink of an eye. I simply couldn't believe I could read a book so quickly.

The book's title says its all - it is indeed a quick-start guide with 12 chapters and the appendices with a plenty of Grails resources for those who are willing to delve into Grails a bit deeper. The author meant to write a book that's "more than a cursory introduction [...] with all the basics of Grails and a few advanced topics" (page 3) and he made it. The book uses Grails 1.1.1, but it didn't really matter as it'd be considered a too low-level detail for this book. The author didn't touch a feature that required knowing it. It was "not intended to be a reference or the only Grails book on your shelf" (page 3 again), yet it deserved the 1st place on mine while proposing a book for people who wanna go pro in Grails.

I wrote it's a book for Grails novices, but it's not completely true as some advanced Grails gems sneaked in as well. I could learn about the uber-generate-all feature or got reminded of a subtle difference between dynamically generated GORM methods like save() and these which are merely synthesized at runtime, i.e. GORM dynamic finders. It was in this book where I realised that the "dynamic finders are limited to searching based on two properties of a domain class" (page 162).

I'm still overwhelmed with the writing style of Dave and how he managed to write the book without those lengthy introductory beginnings yet everything appeared to be intact in all its entirety. I had to be very patient reading consecutive chapters in one go in the other Grails books, but Grails, A Quick-Start Guide was the contrary. The author described Grails' features with just a few sentences and moved quickly on to leveraging them in the real web application being developed throughout the book. Each chapter was a Scrum-like iteration that at the end brought a new feature to the web application. As with the quote by Benjamin Franklin which begun the chapter 2. Our Project - "Tell me and I forget. Teach me and I remember. Involve me and I learn", the book explored Grails with its practical use to build a real project in order to have its readers involved. The author assumed they could eventually learn and appreciate Grails' strengths in hours rather than months and I think he managed to balance the theory and practice very well. The accompanying screenshots and the code snippets were chosen reasonably.

Reading the chapters was smooth and easy. The chapter 8. Knock, Knock: Who's There? Grails Security almost killed me for its title. I couldn't stop laughing when I first read it. Not only was the subject funny, but the chapter itself finished so early that I had troubles believing it's over. Whenever I see a chapter about security I fear a lot and it makes my good mood passed away. It's almost always boring and lengthy. This one was different. His writing style and a sense of humour seem very addictive.

The last chapter 12. Deployment and Beyond was about deploying web applications to "something a little more heavy-duty, such as Tomcat, or a full-blown JEE server" (page 195). It struck me heavily that Jetty was considered less production ready than Tomcat. Anyway, it didn't influence the chapter at all since it took 4-5 pages without a reference to any container-specific configuration file or task. It merely mentioned Grails' DataSource.groovy configuration file and the war build script, pure and simple.

The writing style of Dave Klein and the comprehensible Grails examples made the reading a very rewarding experience. It's a must-have, elementary book to become productive with Grails for novices and anyone who thinks about writing a book that can attract its readers' attention.

Osobiste