Martin Fowler on his bliki (part blog, part wiki) has a new entry about the ongoing debate about using Groovy or JRuby on the Java VM. I really don’t have a problem with anything he wrote there. I agree that both languages are interesting and worth developers getting to know and that Ruby probably has the edge on where things are going in the future. But one of the largest driving factors as to why a development team might choose either Groovy or JRuby wasn’t covered at all. So with apologies to both Martin Fowler and Ronald Reagan (not that I think he’s particularly upset with my hijacking of one of his more famous lines) I’d like to make my small addition.

My Dad’s dad was a blue-collar, regular joe who worked as a boilermaker for more years than I’ve been alive. He also grew up in a very large, very poor family in Louisiana during the 1920’s and 30’s. He was very much a no nonsense kind of guy. As I grew up he would often say comments or sayings that on the surface seemed pretty basic and simple but as you thought about them you started to see how complex and deep they really were. I also noticed that the sayings would be more clever the more cans of beer that were missing from his case. Anyway, one of my favorites was “Son, if you want to move a train, you back up the engine to it…and pull.” Yeah, no kidding. Thanks grandpa.

The heart (and the clever part) of that saying is what is missing from Martin Fowler’s entry. Go ahead and take into account all of the things he lists on the page but also add in the costs of overcoming the peopleware issues of trying to pull your organization in a new direction. There are a lot of developers out there that aren’t very skilled. These poor lost souls barely understand idiomatic Java after years of working on Java-related projects. You are not going to move an organization of these folks by throwing down the gauntlet and simply willing them to move. You are going to have to take the active roll of backing up your engine to pull their massive weight.

Groovy is a nice way to get Java developers - skilled or not - exposed to some of the ideas and idioms that scripting languages bring to the table without leaving the safety of Java (the language). It isn’t an all or nothing deal with Groovy like it is with Ruby/JRuby. You can take your time acclimating developers to the new world instead of simply throwing them into the deep end and hope they swim. It is just like you wouldn’t back up a train engine, attach the cars, and then try to floor it to get the whole thing moving.

JRuby on the other hand appears to be focused on getting Ruby developers a foothold into the JVM. I’m not saying JRuby doesn’t bring anything to the table for a entrenched team of Java developers I’m just saying the overhead of doing so is higher than Groovy since you can’t fall back to a more Java-like idiom if you need to. But if you have the development staff that can just jump in and go all out by all means do so.

So, take Mr. Fowler’s advice about Groovy and JRuby but don’t forget to think about how you’re going to back up to the train.