The next session I attended was by a person from Atlassian. This session was on Grails. Now, I’d heard of Grails, but didn’t quite know what it was all about. I assumed it was a very different technology from Java, something like Ruby on Rails. Only half right, as it turned out. Yes, the technology was inspired by Ruby on Rails, but it’s based on Java technology. To be precise, it’s a software stack consisting of Java, Groovy, Spring, Hibernate and HSQLDB.

It’s a little hard to describe what Grails is. Those who attended Ben Alex’s talk early last year on the coming Spring project tentatively called ROO (Real Object Oriented) will have a fair idea of what I’m talking about. Grails seems to have everything that ROO promised (but hasn’t yet delivered on). It’s a toolset that lets designers build applications based on the principles of Eric Evans’s Domain-Driven Design, and it works very hard behind the scenes to build all the infrastructure required to make the domain objects just work. Persistence, a RESTful web interface, test cases, - all get automatically generated. An increasingly common theme that I’m hearing pervades Grails - “Convention over configuration.” In other words, if you stick to standard naming conventions for things that you create, the system will make it very easy for you to build a working application with a minimum of coding.

That’s the jaw-dropping technology I talked about at the beginning of this post. Grails is a developer’s dream. One can knock together working code in minutes. InfoQ has a Grails guide and example code which I intend to work through as soon as I possibly can. I would recommend Grails to all Java developers looking for the next burst of productivity. Best of all, Grails applications can be exported into standard war files and run on standard app servers, so there is no need for any new run-time technology.

Funny how one can be searching for months for a productive development environment that lets you build applications rapidly yet correctly, and then one fine day, it comes up and hits you between the eyes. Praise the Lord! I intend to use Grails to illustrate concepts with working code from now on. I’ll blog about my experiences with Grails as I get some experience with it.

Ganesh Prasad

Tags: ,



Leave a Comment