Wednesday, July 9, 2008

The Grail of Java Web Development



Almost a year ago, in a post on metaprogramming, I announced that I would spend a few lines on my experience with Grails. I must tell you why I needed it: I wanted to develop some quick-and-dirty R&D Web prototype for my former employer, and also another one for my own pet project (a bleeding edge social web application, more later...).

I am a java fellow, not too keen on web programming (yes, I have done J2EE, servlets, a bit of Spring, and all that jazz, but my core interest is algorithms dev, not web architectures, plus patience is most definitely not my chief virtue), thus I needed something that would get me going real fast.

Rails? yes, but I had no time to learn Ruby well enough, and moreover I had some java code I wished to reuse, without any further ado.

The choice was obvious: Grails.


I have got to say that the very first minutes were truly blessed: seeing an entire web app coming out of nowhere was extremely gratifying. Customization? Well, it was a bit of a pain, to tell you the plain truth. Groovy is easy, but is still another language, and things are not entirely trivial when it comes to going beyond a simple CRUD app. However, all in all, big thumbs up.

The best part is, there are many plugins available.
You need security? ACEGI plugin.
You need search? Worry not, there is a searchable plugin based on Compass and Lucene.
Do you want to do some fancy Ajax stuff? Plenty of choice. For instance, the GWT plugin.
Bottom line: you have (most of) the tools you need.

Is Grails scalable enough for a true enterprise app? Some say yes (I tend to believe them), some say no, but fact is, I do not know yet for sure (I''ll tell you in a while). What I do know is, if you want to develop some web prototype at the speed of light (almost), and you do not want to go out of your familiar java turf (why should you?), stick to Grails.

PS I have already written on Graeme Rocher's blog this one, but I am going to repeat it here and now: as a social web researcher/developer, I would love to see some plugins dealing with the OpenSocial API, or perhaps a FaceBook API plugin, i.e. some way to get a template of a social web app right off the shelf, as it were. As I am a big believer of the programmable social web, I think this step would skyrocket Grails to another dimension of adoption and success. Hopefully something along those lines will be available soon.

No comments: