Thoughts On Groovy and Grails

I have been going to the Austin Groovy and Grails group. It seems like Groovy is gaining some momentum. It was gaining some momentum, and then for a couple of years it lost some steam, but now it’s coming back.

I have heard some rumbles that Java shops have gone with Rails since they not find some Grails devs. I wonder if there is anything to these anecdotes. It seems like it would be cheaper for Java devs to learn Grails than Rails. If you go with Rails, not only do you have to learn a new language, but a whole new ecosystem.

I have also heard from a lot of people whose companies are using JRuby. These companies have a huge investment in Java code, and they do not want to throw that away, but they want a more dynamic, agile language that is more amenable to TDD. Which makes me wonder why they did not choose Grails. The reasons they go with JRuby is the whole reason Groovy and Grails were invented.

I have worked with JRuby, and frankly it is more trouble than it is worth. There was a presentation about it recently at Austin on Rails, and the speaker showed a slide with some JRuby code. He said, “This code looks odd to a Java developer. It also looks odd to a Ruby developer.” I thought to myself that is a good reason to not use JRuby. Outside of Ruboto, I think JRuby is a solution looking for a problem.

Another issue with JRuby is you lose the ability to use all the gems written in C. There goes a lot of the power of Ruby.

One reason people give for going to JRuby is that the JVM handles concurrency better than MRI. That is true, but for me that does not change the fact that Groovy is easier to work with on the JVM is than Ruby since that is the environment that it was built for. I just do not find JRuby as easy to work with as MRI Ruby or Groovy/Grails. The whole point of Ruby was to be easier for developers, and I think JRuby takes that away. If MRI has a weakness, then fix it, or just drop Ruby entirely. Don’t try to fit a square peg into a round hole just so you can still tell yourself you’re a Ruby developer. It’s just not worth it in my opinion.

I think that if Elixir can get off the ground, then a lot of Ruby developers will go with that. I am not an Erlang developer, so for all I know Elixir may be another square peg/round hole issue.


Image from an 11th century manuscript made at the Abbey Library of Saint Gall  (Wikipedia page here), image from e-Codices, assumed allowed under Fair Use.