JRuby on Rails (JRoR) demonstrated at JavaOne

JRuby on Rails (JRoR) demonstrated at JavaOne

Summary: Thomas Enebo and Charles Nutter surprised attendees of their JRuby talk at JavaOne today by showing off an early prototype of JRuby on Rails. Being careful to call it a "development preview", they promised that by the end of the summer they would have a fully supported version working.

SHARE:
TOPICS: Open Source
3

Thomas E. Enebo (Aandtech) and Charles Nutter surprised attendees of their JRuby talk by showing off an early prototype of JRuby on Rails. Being careful to call it a "development preview", they promised that by the end of the summer they would have a fully supported version working. Downloads will be available before then in order to get early feedback.

Live demo of JRuby on Rails

The possibilities that JRoR open up include ease of deployment and access to the full set of Java libraries that currently have to be re-implemented in the Ruby environment. For example, you don't need to install mod_ruby - just deploy your JRoR app as a .war file. And if you wanted to use, say, Hibernate instead of ActiveRecord, that would be possible.

Ruby is a pure OO dynamically typed interpreted language. It's defined by the open source C implementation - there's no formal specification. It was started in 1993 by Yukihoro 'Matz' Matsumto, but only recently became popular due to the ascendence of the Ruby on Rails (RoR) framework.

JRuby is implemented in Java, and is open source (GPL/LGPL/CPL). It uses native threads, and runs on Java SE versions 1.4.2 or higher. The project was originally started in the fall of 2001 (based on Ruby 1.6) but now implements nearly a full Ruby 1.8 feature set.

The authors want to make using Java a natural part of JRuby. As part of that, JRuby allows you to:
- Import java classes into Ruby
- Rubify Java code (it maps core number, string, and list types, rubifies method names, and adds common ruby methods to core types)
- Implement Java interfaces from Ruby
- Use Ruby from Java code using BSF (a JSR-223 implementation exists too)
- Run with Ruby's standard libraries
- Use native threading (also Ruby 2.0 will do this)

Ruby is an elegant, powerful language. JRuby gives to Ruby Java technology's capabilities, and JRuby gives to Java technology Ruby's capabilities. It's another tool for the developer's toolbox, and demonstrates that the Java VM, like .NET CLR, can support many languages.

JRuby is ready for use today, and will only improve in the future. For more information see www.jruby.org.

Topic: Open Source

Ed Burnette

About Ed Burnette

Ed Burnette is a software industry veteran with more than 25 years of experience as a programmer, author, and speaker. He has written numerous technical articles and books, most recently "Hello, Android: Introducing Google's Mobile Development Platform" from the Pragmatic Programmers.

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Talkback

3 comments
Log in or register to join the discussion
  • JRoR

    Seems somewhat 'eliptical' to use JRoR when the shortest distance between two points is a 'straight line'--RoR.

    But, there must be a virtue! ;)
    Thanks Ed for an interesting article.
    D T Schmitz
    • What is the virtue of JRoR?

      The only reason I can think of is that it makes development simplier for Java developers. So it's not really for RoR developers? That is my guess.
      TJGodel
      • Some of the virtues are...

        Well, consider that a lot of people using RoR also know Java, and may have existing Java code or libraries that they want to use.

        Also, for Java EE shops, this gives them a nice migration path to use Rails.

        Finally, now that Java EE 5 is out it's possible we might see the momentum going back to Java EE, and JRoR would give RoR people a migration path into the Java world.

        Reaction was quite positive to it in the session I was at, which was filled (obviously) with Java programmers. Maybe they want some of the benefits of Rails without completely leaving Java behind.
        Ed Burnette