Groovy or Ruby? Hmmn...

March 14th, 2008

There’s a lot of excitement about Groovy in my circles. There should be. As has been said elsewhere Groovy could quite possibly replace the Java language as the predominant code-language for writing JVM-running apps. But.

To add a bit of fuel to the fire – and one of the reasons that I’m choosing to look harder at Ruby in particular – is … try running a Groovy script without Java or a JVM. Don’t get me wrong this isn’t so much a knock against Groovy as it is praise for Ruby. One of the things I really like about Ruby is how quickly I can not only code up a prototype of some functionality, but more importantly how quickly I can run it and get the results and try again. In a Test-Driven environment this is extremely important.

With JRuby I even get basically the same kinds of Java integration as Groovy. Indeed this is an exciting time in the development of virtual machines and their support for many languages. Sun is playing catchup with MS’s CLR. But, I just don’t want to be tied to any virtual machine…which makes Ruby just slightly more attractive to (right now).

2 Responses Follows

  1. James Lorenzen says

    That is all you have? That is pretty weak. The only reason jruby looks attractive is you don’t have to worry about deployment issues with mongrel. :) About your jruby comment, this is a good article by grails project lead Graeme Rocher comparing groovy and jruby: http://graemerocher.blogspot.com/2007/12/re-groovy-in-ruby-implement-interface.html

    Whatever you do don’t assume I am not a rails or ruby guy. I would love to learn it and in some areas I think has the current advantage. But since my project doesn’t have the luxury of running 70+ mongrel instances we have to stay with jboss.

    I am actually glad both exist because we are the winners of this competition.

  2. Me says

    I kind of assumed you’d reply. :0

    I actually didn’t ever refer to Rails (intentionally). I wouldn’t consider myself a Rails developer – in fact quite the contrary, I actually hate Rails. Not for the same reasons as Zed, but pretty damn close. And, for that matter I could care less about mongrel too. Granted a part of it is based on mongrel I prefer Thin.

    I get Graeme’s point – and that just validates mine. I don’t want Java, period. If I have to build a Java application then I will spend the time to get comfortable with Groovy. Right now I actually trying to get as far away from Java as possible (which not be very far, but I’m still trying). And, If I actually had to do Java I would most like try until I was blue in the face to use JRuby. And, if it was required to be a GUI, I was spin my wheels on monkeybars until I hit the wall. I say this but I obviously would be smart about it. If there were something like security that wasn’t mature enough in JRuby than I would stall the project long enough to get it cured. :)

    FWIW, I don’t think you are the “odd” case that is so tied to Java that any movement – or even thinking – about alternatives gets you shot. That considered Groovy is obviously the best thing since…


Your Response