<< October 2007 | Home | December 2007 >>

Grails - just use it already

Now and then I see worries regarding using Grails for production apps, even though there are quite a few already out there. For the last few months I have been working on another one. All I can say is, Grails is the least of your worries! In fact, it's the part that 'just works' for the most part.

I won't be able to get into details about the app. But I can say it consists of 34 domain classes, 50+ views and about 2 million records inside a PostgreSQL database. For the first part of the project, I was lucky enough to get the lions share of the Grails programming, while others worked on data and report conversion from the old Access app.

So, not a huge app, but far more than simply serving up pages, or a simple todo list.

The good stuff:

  • Lets you get things done. Interactively creating the application is a joy that cannot be described.
  • Malleable. Take data queries: we use dynamic finders, HQL, SQL - whatever works best in the current context. There are many other instances where Grails doesn't restrict what we want to do.
  • Plays nicely. In the end it's just code on a JVM. We can reuse whatever libraries we please, in our case, Jasper Reports, XStream, OpenCSV, and many others. And then package it all up in a war. And of course, run tests using familiar tools like JUnit. The list goes on.
  • You get to code in Groovy almost all of the time! This is a huge factor to me.

 The minor problems:

  • We started with and are still using Grails 0.5.6, and so there are some minor quirks to live with that have been fixed in later versions.
  • I wish I had the speed and reloading capability of 0.6+! Upgrading is a small risk, but one to take later on, we still have too many other things to finish.
I don't know if these are really problems! Just irritations.

It seems the hardest issues were with the other components: PermGen issues, strange performance problems on PostgreSQL (some of the queries are very complex), bizarre problems on different operating systems (OS X for developing locally, Windows Server of some sort for test and production), an odd problem where the redeploy script doesn't work at random times. And many other things. But few that are the fault of Grails.

So stop worrying if you should try Grails, and worry about, oh, the other 80% of things that really deserve the worry!