This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I've seen the hype for both. Ruby by itself is a very popular language. Can you give me some compelling reasons why I should choose Groovy over JRuby? It also seems that Sun keeps pushing Ruby as another first-class language citizen that runs in JVM.
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
Originally posted by Freddy Wong: It also seems that Sun keeps pushing Ruby as another first-class language citizen that runs in JVM..
Well, I have to disagree with that. Groovy is scripting for java in the first place, while ruby isn't. JRuby was created to implement ruby which is becoming very popular. Groovy has its own JSR, which means that Sun is supporting it more. I believe that sun is increasing its support for ruby, because ruby is already gaining popularity, that it might eat a part of java's market share. By supporting it, sun is ensuring that a lot of the people who might consider leaving java for ruby would still use ruby withing the JVM, and it might even get some of the ruby developers to try it out in the JVM, to get the advantages of java together with ruby.
For me, the question boils down to which language do you already know. If you already know Ruby, then JRuby is a natural fit. If you already know Java, then you'll be hard pressed to find a language that is more Java-like. [ February 19, 2008: Message edited by: Jim Yingst ]
Oops - I hit edit when I meant to hit reply, and I killed the rest of what Scott just typed. I'm really sorry about that, Scott. I noticed the problem too late to recover the original, it seems. If anyone else happens to have the text of what Scott's post said before I killed it, send it to me and I'll replace it above.
The reason I was replying in the first place was to clarify - when Scott said "you'll be hard pressed to find a language that is more Java-like" - I assume he meant to add "than Groovy".
Sorry again, Scott and everyone.
"I'm not back." - Bill Harding, Twister
Joined: Jan 30, 2000
As I recall, the rest of Scott's reply was to consider several possible situations. If you already have a Ruby on Rails application (or a group of good RoR programmers) and are looking to add some Java enterprise power, you should probably use JRuby running Rails. If you have an application using Python, use Jython. And if you have a Java application that uses Spring and Hibernate (that you'd like to simplify and/or enhance), then Groovy will be a particularly good fit for you.