Rails or Grails
I have just emerged - blinking - from a long splurge of Java server side development. Bluetrail’s products are based on the Spring/Hibernate stack and while I can appreciate the power of these technologies they certainly aren’t the most fleet of foot. Productivity is not as high as I would like and to be honest web programming with Java can be pretty turgid, what with all the build scripts, XML, compilations and Tomcat context reloads.
As ever, I am always casting my eye over the fence and very attracted to the emerging “code by convention” frameworks. The two contender of course are “Ruby on Rails” and the more Java (or should I say Groovy) based “Groovy on Grails“.
The web is full of talk about these two technologies but I was trying to distill in my mind what the key strengths and weaknesses are:
Ruby on Rails:
Ruby looks brilliant, it is all in one box as opposed to lots of different libraries and the community is strong. The language is significantly different to Java but should be easy enough to pick up. Development productivity is pushed even further by the hot fix nature of the tools - more quick changes as opposed to context restarts and re-compilations.
On the downside, the deployment looks a bit messy - my hoster is already releasing a new environment based on Mongrel having only just started doing Ruby hosting last year. As I have said most of our stuff is written in Java so moving to Ruby would mean total re-writes - sigh. For this reason I am also no not convinced that Ruby will be taken up in the corporate environment in any big way. This is important as it is nice to have skills you can sell in to the blokes with cash now and again.
Finally I don’t buy all the scalability bollocks people keep on about. Twitter may have had problems but then it is a mentally busy site. For 96% of us (statistics provided my dog Betty) this doesn’t matter a jot - productivity is the big payback.
Grails
What makes Grails really attractive is that is promises all the productivity benefits of ROR but is built on the Java/Hibernate stack so you can still use some of you existing Java skills and potentially integrate into you existing Java code and libraries. You will have to learn Groovy but then you’ll have to learn Ruby too so that is canceled out.
The product of a Grails app is of course a WAR file so this should deploy to your existing Java server environment in the same way - no farting about with new hosting environments.
The downsides appear to be that Grails is not as mature as ROR. I think it only got it’s 1.0 release last year and I am never an early adopter of anything if I can help it. That said, it certainly appears to have got some traction out there so it will have a future. Another thing that turns me off is that it is not as quick as rails in making little changes. This is one of the big things that breaks my heart about Java server side development …. sigh.
Next Steps
My head tells me to invest a bit of time in Grails. I love the look of ROR but I can’t be arsed to bin all of my existing code. The next step then is to buy a Groovy on Grails book and leave it in the upstairs toilet.
;-)
2 Responses to “Rails or Grails”
Leave a Reply
December 13th, 2011 at 10:36 pm
Help, I’ve been ionfmred and I can’t become ignorant.