Thursday, August 12, 2010

(J)Ruby or Groovy for scripting in Java environment

It's my dilemma. And I come to the conclusion that (J)Ruby is a better choice:

  1. Groovy provides easily integration with existence Java code-base.
  2. Groovy is easy to learn for Java developers
  3. Groovy has the similar "power" as (J)Ruby
  4. Grails has "support" from SpringSource
  5. Groovy/Grails has competitor inside SpringSource - Spring Roo.
  6. Groovy has evolving community.

  1. JRuby can be integrated in existence Java code-base but no so good as Groovy
  2. Ruby has amazing community (tutorial, screencasts, books, etc.)
  3. Ruby language is "super sexy", but I think it's because of hype in community ;-)
  4. Engine Yard is big player in Ruby community. It supports JRuby and Rubinius projects
  5. Ruby can be run not only on JVM! So, I can reuse my Ruby-knowledge in different environments
  6. Ruby is faster then Groovy.
  7. Ruby has good support on *nix environments, but there are some issues with popular gems on Windows.
I know that all these ideas are subjective and you can select own pros/cons.

The another main item against Groovy is that there are so many JVM languages (Groovy, Jruby, Scala, Jyton, Clojure) and they are change each other in popularity from year to year. Groovy, Scala, Clojure are JVM based mainly (Clojure has CLR implementation). It's hard to get some expensive time to dive deeper in each of them.

Conclusion is pretty simple - use the right tool for the job.