Slashdot Mirror


Ruby Off the Rails

An anonymous reader writes "IBM DeveloperWorks has an interesting writeup on Ruby that takes a look at the programming language as a stand-alone solution rather than defining it in terms of Rails. From the article: 'Ruby on Rails is just one facet of what makes Ruby great, just like EJB is only part of the Java enterprise platform. Andrew Glover digs beneath the hype for a look at what Java developers can do with Ruby, all by itself. Ruby's syntax is quite different from that of the Java language, but it's amazingly easy to pick up. Moreover, some things are just plain easier to do in Ruby than they are in the Java language.'"

5 of 325 comments (clear)

  1. Re:It's obvious by Anonymous Coward · · Score: 5, Informative

    ikkibr is a robot that looks for similar past articles and reposts highly-modded comments from those articles. See http://ask.slashdot.org/comments.pl?sid=171820&cid =14310500

  2. Re:What I need to know by the+eric+conspiracy · · Score: 4, Informative

    Ruby is useless to me because it has no unicode support.

    In this shootout it was found that Ruby had lower memory consumption, but also ran much more slowly than Java:

    http://shootout.alioth.debian.org/benchmark.php?te st=all&lang=java&lang2=ruby&sort=fullcpu

  3. The author of the article, Andy Glover... by tcopeland · · Score: 4, Informative

    ...is a good guy to write this sort of thing since he's been programming Java for a long time and has also branched out into "dynamic Java" things like Groovy. He's done a bunch of stuff on dbUnit (including a dbUnit chapter in Java Testing Patterns), too. So he's had enough experience with Java to know what's what.

    I'm probably biased, though, since Andy also wrote the CPD Ant task.

  4. Re:So, what's it like? by arevos · · Score: 4, Informative
    With the right tools and a good IDE, Java web development can be fast. Not as fast as getting the initial pages up with Rails scaffolding, sure (although projects like Trails come close), but still fast.

    I'm doubtful. I bump up against the limitations of Java every other day, and it seems like the only way you could get around such things is with an awful lot of code generation.

    For instance, I was recently writing a Java class to convert an XML DOM into a custom object tree. This largely involved writing getters and setters, and for loops to iterate over NodeLists to pull out descendant elements. I couldn't help thinking that with Ruby, I could have written "has_attributes" and "has_descendants" methods, and generated the getters and setters and DOM handling automatically. Instead of my classes being 50 lines apiece, they could have just been 4. It would have taken me far less time in Ruby than I did in Java, because Java hasn't got metaclass-like abilities like Ruby or Python.

  5. Ways of Using Ruby by TheUncleD · · Score: 4, Informative
    Also, there's many different ways of using Ruby besides Rails. Rails is ONE freamework. Iowa is another here you can find out . Another is just plain eruby mod_ruby. Another is cgikit, a friend of mine uses it exclusively although it has little english documentation at this time.

    Rails as has been said, is a framework. Ruby is the language, and all rails is just ruby with a design in place to make it easier. Some great tools for using rails are becoming available though, due to its increasing user-base. A lot of people are still "trying it, and going back to php" but its got a core user group now and that's what counts.