File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JRuby benefits?

 
Phelipe Maia
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the benefits of JRuby? Do you recommend JRuby? If I want to use ruby, I have to use just Ruby without other languages?
 
Himalay Majumdar
Ranch Hand
Posts: 324
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most important aspect of JRuby is that it is tightly integrated with Java that allows Java application talk to Ruby code. I dont think you need JRuby if you just need Ruby without integrating with any other language.
 
Phelipe Maia
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know. The question is: Everything that I can do using Java, I do with Ruby? Or I have to, in a specific case, integrate the languages?
 
Himalay Majumdar
Ranch Hand
Posts: 324
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what Sun says...

Why JRuby (over Ruby)

•With JRuby you get the best of both worlds: Ruby applications and libraries, plus Java libraries. And you can access those libraries with Ruby syntax (or Java syntax, if you want).
•On average JRuby, runs 2 and a half times faster than Ruby, except at startup
•In addition to native threads, JRuby supports Unicode natively
•Code can be fully compiled ahead of time or just in time

Why (J)Ruby over Java?

• Ruby is fun, beautiful, and powerful language
• Ruby has features missing from Java
> Closure (blocks)
> Open classes
> Meta programming
> Duck-typing
• Domain Specific Language (DSL)
> Through (J)Ruby's capability of allowing expressive method names and cushy semantics
 
Peter Cooper
Author
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've had some great answers above but yes, JRuby is very good and ready to go. It's considered production ready and it's not really a "beta" or anything like that anymore. Whatever you can on Ruby, you can run with JRuby on the JVM now and... considerably faster in most cases too!

In theory you can do whatever you can do with Java with JRuby but.. I suspect there are some exceptions! I've not seen people developing applets, for example, but I suspect it's possible. JRuby can "compile" code but I'm not sure how far it goes and whether you end up with completed .class files. I believe you can (I'm not really a Java guy) but then a JRuby JAR comes along with it to run the more dynamic parts.
 
Michael Sullivan
Ranch Hand
Posts: 235
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd only add that I've read a number of articles that have Yarv beating JRuby. I am excited for JRuby's future, not as much because I want to keep using Java libraries/accessing legacy Java code - but because Ruby code can then leverage the benefits of the JVM as a platform (and app servers like Glassfish).

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic