File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ruby and the fly likes Groovy vs Ruby vs Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Groovy vs Ruby vs Java" Watch "Groovy vs Ruby vs Java" New topic
Author

Groovy vs Ruby vs Java

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

What could be it? I've read from google search is that Groovy is a serious competitor to Ruby. Is this true? Both Ruby and Groovy tend to do the same? Advice needed guys!


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Jothi,

I like and program in both Groovy and Ruby (and also program in Java and C#).

I have some comments on these languages at
http://www.coderanch.com/t/518/Groovy/Why-choose-groovy

After you read it, please feel free to post any comments or questions here (or there).
M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
Venkat,
Here is another question. You have mentioned that Groovy has access to the Java API. Does JRuby not have access to Java API? The reason I ask this question is, if it doesn't that clearly gives an edge to Groovy.

Thanks
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Rama, You can access Java API from JRuby as well. However, Groovy enhances that API through GDK. So in Groovy you can use the Java API using what's already provided in the JDK or much more elegantly using the GDK extensions as well. Also, Groovy objects derive from the good old java.lang.Object as well. It is easier to intermix Groovy created objects and Java created objects. That is why I say that if integration with Java is your primary interest, Groovy is a better choice. If you want to use more of Ruby libraries and Ruby syntax on the JVM, and take advantage of the performance JVM will bring, then JRuby is a better choice.
M Rama
Ranch Hand

Joined: Mar 04, 2005
Posts: 91
Thanks Venkat. That gives a good enough explanation of what I was after.

From going through all the threads, it seems Groovy will serve my purpose better, and will be easier to sell to the company than JRuby.

I was very excited about Groovy when I heard Scott's Groovy talks at NFJS. However, I didn't have the right books then to go on. Now that both yours and Scott's book are out, can't wait to get both of them and get started.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9353
    
    2

Thanks for the info.
Harrison Reiser
Greenhorn

Joined: May 20, 2008
Posts: 1
A clarification: JRuby is interpreted, not meta-compiled.

EDIT: Or, it was until recently. Heh.
[ May 20, 2008: Message edited by: Harrison Reiser ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Groovy vs Ruby vs Java