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 Ruby v Groovy? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Ruby v Groovy?" Watch "Ruby v Groovy?" New topic
Author

Ruby v Groovy?

Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

How do you see the comparison? Isn't it easier for a Java developer to learn Groovy syntax? Also, it provides much of the same features like Ruby but with enhancements. There is a good community too.

I still feel Ruby wins as a scripting language. But I have not worked a lot of Ruby. Perhaps the author can shed some light.


===Vyas Sanzgiri===
My Blog
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I'm curious what you mean by Groovy being like Ruby but with "enhancements". Can you explain what features exist in Groovy but not Ruby that you are calling enhancements?


A good workman is known by his tools.
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Using Groovy one can use the Java API using what's already provided in the JDK or much more elegantly using the GDK extensions.
Groovy objects derive from java.lang.Object so it is easier to intermix Groovy created objects and Java created objects.

SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
Peter Cooper
Author
Greenhorn

Joined: Jul 17, 2009
Posts: 25
Unfortunately I can't really give you an answer to this. I have no experience with Groovy other than a casual look. I don't know enough about it to make a serious comparison, however. I must say, I heard a lot of people talking about it a couple of years ago but hardly hear anything now, so maybe that says something for its popularity (or maybe not!). Ruby has a very active community and lots of new things coming out all the time - so if you used those as metrics, Ruby should be ahead.


Author of Beginning Ruby (Apress): http://bit.ly/t31ag
Editor of Ruby Inside and RubyFlow
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Thats so true..even the TIOBE index says that.
I wonder what happened to Groovy.
Peter Cooper
Author
Greenhorn

Joined: Jul 17, 2009
Posts: 25
Considering that all I heard about Groovy a cpl years ago was good, I suspect a cultural issue of some sort. Perhaps it didn't attract enough people or have a big enough landmark project to get people in and building out the ecosystem..
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
One thing I'd look at when comparing Groovy to Ruby (or Grails to Rails for that matter) is the amount of new ideas coming out of each. One of my friends really got turned on to Ruby/Rails because, as he says "thats where all the innovation is".

I did a search a while back for projects related to either Ruby or Rails, and I found some exciting projects:

prototype, rspec, rbiphonetest, raven, CoScripter (IBM) scripting of business of business processes in the browser (sound like selenium), selenium, cucumber, shoulda, test-spec, jspec (javascript testing via firefox), webrat (another browser based testig), mocha, devver (cloud based testing for ruby testing frameworks).

While not an exhaustive list, I think it demonstrates the vitality and spirit alive in the Ruby/Rails community.

Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

true but the fact is - same projects get converted into Groovy equivalents with enhancements. Check out some of the issues Ruby faced early on and how Groovy is evolving. The trend seems similar
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Vyas Sanzgiri wrote:true but the fact is - same projects get converted into Groovy equivalents with enhancements. Check out some of the issues Ruby faced early on and how Groovy is evolving. The trend seems similar


Which projects are you referring to? What specific enhancements? What specific issues?
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

The same projects you are referring to!!! Check it out...
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 467
One of the strong points of groovy is that it's on top of java, so you can use anything from the java stack or any third part libraries (spring, hibernate, etc.) in groovy programs. Since JRuby appeared, with ruby being the innovative one, groovy did not gain much popularity.


Visit my blog: http://jnassef.blogspot.com/
Jason Mayer
Ranch Hand

Joined: Oct 16, 2007
Posts: 31
This is actually kind of interesting. I've only recently started seeing a trend of companies hiring people because they know groovy.
But, since nobody is answering the question of "What exists in Groovy that doesn't exist in Ruby", I'll contribute. One thing that exists in Groovy that didn't exist in Ruby (at the time I was learning it) was a stable gui framework. Griffon and/or SwingBuilder allow one to make relatively painless java desktop apps. Last I checked (and again, it was three years ago), Ruby didn't have any way to do anything like that except for wxRuby which was extremely buggy and not very intuitive. Whenever people would ask on the Ruby mailing list for options, people would say 'Why not do it in rails?' as if that was the only solution. What's changed since 2006 that makes it easier to create a deployable desktop application? This is a question specifically for those times when you do not have the ability to run a server due to some security restriction or another.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
I agree that preparing GUI apps via Groovy is possible, but considering Swing (or any framework derivative thereof) relatively painless is an interesting proposition.
Jason Mayer
Ranch Hand

Joined: Oct 16, 2007
Posts: 31
Michael Sullivan wrote:I agree that preparing GUI apps via Groovy is possible, but considering Swing (or any framework derivative thereof) relatively painless is an interesting proposition.


I'm sorry, but that doesn't answer the question. Is there a comparable framework for making relatively painless desktop applications in Ruby? In other words, has wxRuby remained the only option (and specifically has it matured at all), or is everything still grails-centric/command line.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Jason: I wasn't answering the question, but challenging the idea that creating Java-based GUI apps is 'relatively painless'. If you want GUI via Ruby, you do have some choices:

Glade
Ruby Coccoa (for OS X apps)
Bowline which attempts to make GUI apps via Ruby, HTML, CSS as simple as a Rails app. Here are some examples of GUI apps via Bowline.

Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

desktop or web apps?
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
Ah, a bit vague. When I referred to GUI apps, I'm speaking about desktop applications. Ruby can be used for both web applications, and desktop applications (though, to be fair Bowline is pretty new).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ruby v Groovy?