Saturday, September 4, 2010

The Quest for the holy GRAILS

It's been five months since I was burned by JavaFX. Five months since sun taught me to hate new technology and the time have finally come to balance out this blog with something much more positive.

It started in the interview for the job I've just started. (Hello from Luxembourg by the way.) One of their technical head honchos mentioned GRAILS. It wasn't the first time I'd heard of it from a senior person in an impressive financial institution either. One of the greatest Irish technical success stories, Realex payments, use it too.

Well, I thought, two out of two places can't be wrong. I decided to check it out for myself. I promptly ordered a book on Groovy and a book on Grails and got stuck in.

Groovy! Not just an Evil Dead 2 quote any more: Oh man, Groovy, what a name. I love it, but the greatness of course goes much deeper than that. Groovy is for the most part a superset of Java even compiling to code that is essentially Java byte code. So what's the difference?

Ever think to yourself in Java, "Why do I have to type this stuff out every time?", Groovy has done that for you. Null protection is achieved by adding a question mark the your reference, Strings are now GStrings (Great name) which can contain externally defined properties. Want to define a populated list object?

def list = ["Hello", "I'm", "a", "list"]

I'm still learning but every time I read something in my Groovy book I laugh out loud like a super-nerd and say to myself "did these guys read my mind when they were writing this?"

GRAILS, it's about time: I've tried my share of web frameworks, definitely not all of them but one or two. There always is something that turns me off, mainly I suppose because I'm a newbie to the web world and everything I've tried so far assumed a lot of starting knowledge and it could be a week before you got anything to look at, if you were lucky. Not so with GRAILS.

No kidding, I had a simple database, a controller, a service layer and an automatically generated CRUD screen together in maybe thirty minutes? I could kick this off and play with it in my browser. (Oh, and there's a jetty webserver integrated with GRAILS, didn't even have to set one up.)

It took a long time to get to the stage where this was possible in any language but even better this is all built on Groovy so every feature it contains is available on every level of your application. Configure your program on the fly, open your grails console and write code that calls subsystems you want to try out.

Too good to be true? Well, I can see why people are using it. Not just your startup up the road with more ambition than sense. GRAILS takes everything Spring (the EJB killer) has and makes it even better. Enabling you to use Groovy out of the box puts it significantly beyond EJB3.0 for me.

My current project will be GRAILS. (The prototype was in EJB3.0). I'm looking forward to getting to know it better.

No comments:

Post a Comment