This is actually two questions rolled into one.
- Is there a particular type of Java functionality that people are using JRuby for or is it mainly because of the performance advantage that JRuby gives versus the MRI?
The reason I ask is, I’d like to add some Java functionality to a Rails project (just to show that it’s possible). Ideally this Java functionality would also be useful rather than redundant. Which leads to my next question . . .
- What’s an example of something that would make a good demonstration of Java functionality being added to a simple Rails CRUD app?
I guess anything you can do in a Ruby class, you could just as easily do in a Java class (with about twice as much code), so I understand the question may be hard to answer. I’m just wondering if there is a particular type of functionality that is more appropriate to do in Java.
There’s nothing at stake here, by the way. I’m just playing around and testing things out.
I think the Ruby class libs (gems) can do pretty much anything the Java libs can do, so there’s not much of a compelling reason to use JRuby on Rails in a ‘stand-alone’ scenario.
I use it to integrate with a vendor Java app. Knocking up a quick controller and some views is much easier than extending using Java/Swing.
Also in a ‘Enterprise’ environment, a rails developer may be obliged to deploy to Tomcat or Glassfish. The Warbler gem for JRuby enables this.