|
Ruby and particularly Ruby on Rails has been hot for awhile now. Ruby in the enterprise is becoming more accepted. As Martin Fowler pointed out nearly a year ago in this blog entry , some top minds in our field including Bruce Tate, Justin Gehtland, and Stuart Halloway have moved Beyond Java . Even one of my old mentors, Mike Gaffney , has repeatedly told me to bail on Java. But I agree with Scott Davis as he points out in this podcast , Java is not dead.
The growing acceptance of Ruby is a strong reason to consider JRuby. Being able to run Ruby on Rails apps on the JVM is very appealing. But remember the context of the decision here. We're talking about a group of developers whose only development language has been Java, and whose projects for the foreseeable future will run on the Java platform. Groovy wins in this context.
There are lots of reasons to get excited about Groovy. It too runs on the ever-improving JVM. In fact, it was the first scripting language officially approved by Sun to run on the JVM. It can be compiled to byte code or run in script form. The interoperability is fantastic. Developers can still use Java, its tools and familiar libraries such as Spring and Hibernate , where appropriate, and mix in Groovy, where that is more appropriate.
But what really makes this decision easy is the similarity in language syntax. You can take a snippet of Java code, drop it into a Groovy file, and it will nearly work. Then, you can take that snippet and start making use of Groovy language improvements such as closures to make the code more readable and intention revealing .
So the decision is easy here. Take the seamless step forward and introduce Groovy.
Rails is not "All that!". Ruby is cool and terse and flexible but in not
anywhere as mature as Java. Take it from a 10 year Java dev who is working
3 months now on a Rails project. Rails seems to attract a lot of PHP
hacks, newbie (to programming in general because thy heard Rails was
"easy") and just generally people with Bad habits or low OO skills too
(which is something to think about when hiring).
One thought to consider: Do you want your students to only ever learn from
Java and derivative languages? I believe it may be a better goal to
challenge them with a language that's more different from Java itself, and
Ruby has opened many people's eyes to a new way of looking at problems. It
seems unusual to look for what would be "easiest" for students, when the
most rewarding challenges are not found the easy way.