Grails in Action, 2nd Edition – A (mostly) winning how-to guide to use with a winning web app framework – #programming #bookreview

 

Grails in Action, Second Edition

Glen Smith and Peter Ledbrook

(Manning – paperback)

Grails finishes at or very near the top in almost any smackdown of full-stack web application frameworks that run on the Java Virtual Machine (JVM). And this recently updated Grails in Action how-to book is mostly a clear winner, too.

According to the Grails.org website, open-source Grails “takes advantage of the Groovy programming language and convention over configuration to provide a productive and streamlined development experience.”

Grails likewise is a world that “moves very quickly,” the authors of Grails in Action, Second Edition emphasize. “There have been substantial changes in Grails in the time it took us to develop Grails in Action, Second Edition. Even moving from Grails 2.2 to 2.3 caused us to make significant changes! Although the book targets Grails 2.3, a new version of Grails (2.4) is already available. Fortunately, everything in here is still valid for the new version.”

In the first chapter, the authors try to move very quickly through the process of getting a Grails application up, running, tested and deployed. But in taking this “Grails in a hurry” approach, they race a bit too quickly and unclearly through the installation instructions, in my opinion. (My Linux and Windows installations did not work correctly at first, and I had to seek out  information on how to sort them out.)

And, in the portion of the chapter where you are told how to get the random-quote database set up and working, it is not always clear which file you are supposed to modify and in which subdirectory. I already had a little bit of experience with Groovy, so that portion went smoothly. But the Grails database steps could have been explained and illustrated more clearly. It took me several tries to finally get the “Quote of the Day” database working and posting random quotes.

The authors take a four-part approach to explaining Grails and its underlying Groovy programming language:

  • Part 1: Introducing Grails – You are shown how to get a nicely formatted Quote of the Day (QOTD) application up and running, while also learning how to work with Groovy.
  • Part 2: Core Grails – You get a “more thorough exploration of the three core parts of the Grails ecosystem: models,
    controllers, and views.” Includes such topics as: domain modeling; query mechanisms; how to query a database in Grails without using SQL; Grails’ web-oriented features; Grails Service objects; Grails’ tags for user interface construction; and Grails support for Ajax.
  • Part 3: Everyday Grails – The focus here is on “building all the necessary pieces of a real-world application.” The chapters cover tests, plug-ins, security in Grails and working with RESTful APIs. The chapters also cover (1) Grails single-page web apps using the Angular.js framework, and (2) Spring integration in Grails.
  • Part 4: Advanced Grails – These chapters zero in on “performance tuning, legacy integration, database transactions, custom build processes, and even how to develop and publish your own plugins.”

Aside from a few small omissions of how-to information, I am happy to have the wide-ranging contents of this book. And I am certainly pleased with what I can now do with Grails and Groovy, after reading Grails in Action, Second Edition.

 —Si Dunn

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s