Grails in Action
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.
- You can get two sample chapters and accompanying source code on the book's page on Manning's website.
- Glen Smith's blog.
- Source code on GitHub.
- The Grails website.
- Exclusive Grails in Action chapter download from DZone.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)