1 Reply Latest reply on Mar 28, 2008 3:52 AM by jwenting

    Ruby versus Java

      I bought a Ruby book and flipped through some others. One thing struck me was the amount of time they generally spend saying "how great the language is" with hardly a word on "how the language is great". In fact they appear to deliberately dodge what's good about it and fail to address what's wrong with Ruby.

      Ruby is an object-oriented interpreted scripting language. Those last three adjectives are a big part of the proficiency gains. We know that on using a scripting language on the surface layer of an application has benefits. Ruby isn't any better than Groovy in that regard and the downside to a whole new syntax is obvious.

      The second leg of the two-legged-stool is Rails and its ability to generate the MVC artifacts for each page (no central controller). So instead using PHP or Perl it sure looks to me like Ruby is a winner. You get a nice MVC pattern generated for you. If you liked JSP 1.0 you will love the view template they provide you (gag me with a spoon).

      Clearly, Groovy and a few MVC generator tools are a better option, Grails for example. This way you can cleanly interface with type-safe, tested and optimized and reusable Java classes. I don't want to use Groovy for all my code and I sure as heck don't want to use Ruby on Rails.

      BTW, why does Java have so many more books than Ruby? Poor Ruby! They certainly must have all the facilities that the Java books represent, they just don't have any darn documentation. Too bad:)

      [img]http://antoniocangiano.com/images/rubybooks.gif[/img]

        • 1. Re: Ruby versus Java

           

          "treespace" wrote:
          I bought a Ruby book and flipped through some others. One thing struck me was the amount of time they generally spend saying "how great the language is" with hardly a word on "how the language is great". In fact they appear to deliberately dodge what's good about it and fail to address what's wrong with Ruby.


          Noticed much the same, but I doubt it's a deliberate oversight.
          Rather their conviction is such that they're under the impression that the reason for Ruby's greatness is so blatantly obvious it needs no further explanation.


          Clearly, Groovy and a few MVC generator tools are a better option, Grails for example. This way you can cleanly interface with type-safe, tested and optimized and reusable Java classes. I don't want to use Groovy for all my code and I sure as heck don't want to use Ruby on Rails.


          Personal preference (mind I agree with you on not wanting either Groovy or Rails).


          BTW, why does Java have so many more books than Ruby? Poor Ruby! They certainly must have all the facilities that the Java books represent, they just don't have any darn documentation. Too bad:)


          Ask a Ruby guy and he'll tell you that the large volume of Java books is clear evidence that Java is a poor language that's overly complicated to need so much documentation for people to know how to use it.
          He'll tell you that Ruby is so easy and flexible that really no documentation is needed and the fact that you want a book probably shows that you're not worthy.

          Ruby is a fun little language that has its place, but its advocates are indeed religious zealots more than anything (and more than Java advocates ever were).
          I've employed Ruby to do work in preparation for Java processes, and it works well for that as an alternative to (for example) Perl or Bash scripts.
          For some things it's faster to write something in Ruby than Java too.
          For example I needed an application that at regular intervals polls an ftp server, retrieves all files from there that were not there the last time it checked, and passes on those files to a Java process for further work.
          I found it easier to write that in Ruby (which I'd not used for serious work before) than Java, had the first version working in under 2 hours (which was refined over the next few days as requirements became more clear just as a Java process would).