Alessio has posted 2 posts at DZone. View Full User Profile

Grails in Action

  • submit to reddit
Published by: Manning
ISBN: 1933988932

Reviewer Ratings




Buy it now

One Minute Bottom Line

This book is a good read for both Grails and developing web applications. It has plenty of space dedicated to testing and is filled with useful ideas on how to leverage the framework and its plugins. I also enjoyed the high-quality accompanying source code.


Since I’ve followed Glen Smith’s blog and Peter Ledbrook’s work for months, I had high expectations for this book. At the end, I experienced no dissatisfaction. The style is clean, friendly, and enjoyable; and the language is easy to understand, which is important for non-native English speakers like myself.

The first part, "Introducing Grails," focuses on the rationale behind both Grails and Groovy. While the information on Groovy cannot replace a good book on the subject, it does an extremely effective job of covering essential topics and is sufficient for anyone who is already an experienced programmer.  

Part 2, "Core Grails," explores the MVC triad implementation and building a real, non-trivial twitter-like application with a model-driven approach. For readers learning Grails from this book, this is the most precious section because it is incredibly comprehensive. Experienced users won’t find it boring in the least because it touches on not-so-widely discussed features, like command objects and multiple bindings. I appreciated the authors’ alternation between paragraphs dedicated to feature exploration and paragraphs discussing practical application. Another key benefit is that topics are detailed with concepts often faced during real development.

In part 3, "Everyday Grails,” you'll be exposed to a good selection of Grails’ plugins. You'll learn the ease of integrating features like charting, full-text search and fancy UIs. Building complex workflows and wizard-like sections, and choices for securing your application are also covered. The coverage on remoting and REST interfaces gives a great explanation on their practical use. My favorite part of this section deals with messaging and scheduling. It discusses how to implement a two-way gateway between Hubbub and a Jabber server, allowing, for example, users to post via IM. This shows how grails allows great and complex feature implementations by combining simple concepts and available plugins. Scheduling (using Quartz) is also discussed in great detail, covering advanced (at least for the intended audience) concepts like clustering and job persistence.

Part 4, "Advanced Grails," is true to its name and covers more advanced concepts. On the GORM side, you'll learn how to deal with legacy db and how to exploit GORM's features to optimize the on-db structures of your domain objects. It also covers transactions at all levels and build-related concepts. The use of Autobase for managing schema migrations à la Rails migrations is also covered; this fits into the agile development style promoted by Grails. The very last chapter is about plugin development and explains how to write plugins, in addition to other concepts like testing, distribution and exploiting plugins to create modular applications.

This book is designed to explain Grails the way it's meant to be used: getting your hands dirty experimenting with the framework and its plugins. All topics are covered in sensible detail and you get framework and web-development hints from real Grails professionals. Readers already using Grails can safely skip the first part (enjoyable, nonetheless) and start from "Core Grails,” where the real fun begins. The accompanying source code is top-notch and an invaluable source of ideas and best practices. It’s hard to pinpoint anything strictly negative about this book. One might be tempted to say "hey, it doesn't describe parameter x of tag y", but the "in Action" in the title clearly states this isn't a reference or a "bible.” Another could be "why hasn’t framework z integration been covered?" but given the overwhelming quantity of frameworks available, I think it isn't possible to satisfy everyone's taste.

This is probably the best book available on the subject. It takes you from scratch to Grails mastery in an enjoyable way, without wasting hundreds of pages on references tables (the standard documentation and, obviously, DZone Refcardz are already the best resource for this!). Overall, this is a really useful book for Grails users at all levels, and also for any web developers in search of a solid guide to Grails.



Published at DZone with permission of its author, Alessio Spadaro.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Roger Studner replied on Thu, 2009/09/03 - 10:52am

I really enjoy this book.  I have it and both of Graeme's 2 editions (the pre 0.3 one, and the recent one).


One of the strong points in this point, is that it addresses quirks, difficulties and flat out problems with things in Grails currently and how to best navigate around them.


I do wish, that someone, somewhere, would put up a VERY comprehensive (as simple as this sounds) tutorial on log4j DSL configuration with grails.  Such a mystery seeing how everyone talks about it so differently



Mike Miller replied on Thu, 2009/09/03 - 8:39pm in response to: Roger Studner

I read Graeme's 2nd edition book and did a review on dzone BUT I was trying to decide whether it's worth reading this book too? I am a big fan of the Manning "XXXXX in Action" books. What do you think - worth reading both?

Roger Studner replied on Tue, 2009/09/08 - 11:34am in response to: Mike Miller

I preferred the Manning book in this case.  It just delivers more *usable* content.. and I even prefer how the chapters/flow is organized.


Graeme's book in some areas has more depth.. but it really reads like it was, suprise, written by the author of Grails.


So much in the Manning book's perspective is based on trials and errors in getting things to work.


I dunno, sorry if that is a bit vague.. i'd say read both.


Pedro Watts replied on Mon, 2010/02/01 - 2:41pm

When I run "grails test-app -integration", how to print out the SQL generated in my integration tests? I'm reading "Grails in Action", and very curious about the sql generated by grails with HSQDB, especially Projections.



Make a twitter poll with

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.