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.'"

9 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. Re:So, what's it like? by arevos · · Score: 3, Informative
    As a side note, why is it the people so quickly forget what these languages are really for. They are Rapid Application Development(RAD) and prototyping languages. You're not supposed to ship products developed with these languages! You're supposed to prototype the application and if it looks viable, develop it in a real language like C or C++!

    Why? The speed of C and C++ are hardly needed for most applications, and languages like Ruby and Python can leverage GUI toolkits like Qt and GTK. If your Qt Ruby application is indistinguishable from your Qt C++ application, why waste time developing in C++ if you don't have to?

  4. 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.

  5. Re:Ruby & Java == Moriarity & Holmes by SmallOak · · Score: 3, Informative

    "The real question is, can ruby be defined on its own terms, and not Java's?"

    I'm not sure this is even a issue. the Disussion on Ruby Vs Java seems to happen totaly outside the Ruby 'community'. I read a lot of Ruby programmer blogs and don't see Java mentioned that much.

    Interesting reading

    http://www.artima.com/intv/ruby.html
    The Philosophy of Ruby: A Conversation with Yukihiro Matsumoto

  6. 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.

  7. How Ruby fits in for my work. by mpn14tech · · Score: 3, Informative

    I work as a java developer, but I still still have plenty of other languages in my toolbox. I have just started with experimenting with Ruby. The biggest thing I see is that Ruby fills gap for me between perl and Beanshell.
    The programming hierarchy I tend to think of for my work,
    1. Shell- Basic scripting. Glueing commands together.
    2. Perl- More powerful sripting features, but not really OO.
    3. Ruby- Still a scripting language, but designed around OO.
    4. BeanShell- Good for quick glueing of java classes together
    5. Java- When I need a full compiled application environment.

    For me each language has its purpose and I use them where it best gets
    the job done.

  8. 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.

  9. Re:Loving complexity for complexity's sake by Decaff · · Score: 3, Informative

    2) Java needs a lot of RAM. If you try to run a java app on a smallish box, chances are it will start swapping.
    3) Swing is Slow, it makes Java GUIs feel cluncky. SWT is much better for the user, it "feels" more responsive.


    Both these are now way out of date. Java memory handling has been tidied up. As even a 'smallish box' these days is more than 128MB, memory really is not going to be a problem at all.

    Swing is hugely faster these days, to the extend where it is often reported to be more responsive than SWT on some platforms (such as Linux). Swing is now by default OpenGL or DirectX accelerated.