Slashdot Mirror


JRuby Great Addition To Java Development

An anonymous reader writes "JRuby combines the object-oriented strength of Smalltalk, the expressiveness of Perl, and the flexibility of the Java class libraries into a single, efficient rapid development framework for the Java platform. This article introduces JRuby, a sophisticated addition to your Java development toolbox."

6 of 51 comments (clear)

  1. Re:So... work with me here.... by Fweeky · · Score: 2, Informative

    No, it's a tree-based interpreter like the standard Ruby one AFAIK.

    I'm still wondering why we're seeing a story on this so long after it's release, when the likes of Rails, one of the more exciting Ruby libraries in recent memory, gets completely ignored.

    Of course, nobody here would really be interested in a powerful, easy way to develop web applications with practically zero configuration. It's just not *fun* without 800k of XML just to configure your ORM library :/

  2. other languages by Intrigued · · Score: 4, Informative
    To my understanding, this is one script interpreter that is being developed for Java. It offers ease of use for people accostumbed to working with Ruby.

    For a larger view of the language development being done similar to this, take a look at List of Java virtual machine languages.

    I should think that most people will find at least something that appeals to them.

  3. Re:So what exactly is the difference... by bonniot · · Score: 5, Informative
    Ruby and Groovy are different languages. They happen to be both scripting languages, and to have an implementation that runs on the jre (Java Runtime Environment), that's all.

    The JRuby article is part of the alt.lang.jre series, with announced articles about "Rhino, Nice, and NetRexx, and many other exciting alternate languages for the JRE". It looks like the articles are coming in this order, one around the beginning of each month.

  4. Or, if you're writing a small utility... by tcopeland · · Score: 2, Informative

    ...just skip Java and go with Ruby.

    I needed a small app to analyze SQL query usage, and Ruby worked great. As long as you're conscientious about writing unit tests, you won't miss Java's static typing at all.

  5. Hrmph. by Estanislao+Mart�nez · · Score: 4, Informative
    Last I looked (which can't have been over a month ago), JRuby was far from being ready for prime time. I'm a Ruby guy myself, yet I really wouldn't touch JRuby just yet, unless my purpose was to develop it myself.

    Groovy is, IMO, a near-clone of Ruby designed from the ground up to integrate with Java, and would probably be a better choice than JRuby. I think the Groovy documentation isn't quite there yet, tugh.

  6. Re:JRuby versus Java [code comparison - short] by Eivind+Eklund · · Score: 3, Informative
    ... and we have a loser writing.

    When you have zero clue how to write the language, I suggest you shut up.

    The equivalent Ruby is (sorry about the lack of indentation - Slashdot seems to eat it):

    require 'java'
    include_package 'javax.swing'

    class Calculator < JFrame
    def initialize
    super("Slashdot Rul3z")
    setSize(400, 400)
    setVisible(true)
    end
    end

    Calculator.new()

    That's exactly one require-line and two blank lines more than your non-idiomatically-indented Java with missing newlines. It is one line less than what I'd consider normal amount of spacing - a newline after the import statement, a newline between the methods, and the {}-block for main actually spaced out.

    Eivind.

    --
    Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.