Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What advantages does Ruby hold over PHP and Java?

 
Andy Daykin
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the author (or anyone else for that matter),

What do you think the biggest advantages are that ruby has over php or java. Let's assume that we are using a framework like rails (ruby), zend (php, or spring (java), just so we can get a better picture of what the languages are capable of.
 
David Black
author
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andy --

I'm not a PHP or Java programmer, so it's hard for me to comment too concretely, but I can tell you that what I love about Ruby, among other things, is how expressive it is -- expressive in the technical sense that a small amount of code can do a great deal. In my experience, the more you work on a Ruby program, the more code disappears from the screen. Moreover, as the code gets smaller, it gets clearer, not more cryptic. (I guess you can do "obfuscated" Ruby code, but that's another matter.)

I've often said that I don't think it's a coincidence that Rails is written in Ruby, because there's such a good fit between a language that has such extensive support for dynamic operations, and a framework that, in some ways, reads your mind. Ruby is great for "convention over configuration" because it's so easy to do things like intercept unknown messages, create methods on the fly at runtime, and so forth. That doesn't mean that Ruby is the only language a system like Rails could be written in, but I think it's a really great fit.


David
 
Michael Sullivan
Ranch Hand
Posts: 235
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to add a few things, coming from a Java background (and before that, various scripting languages).

With Ruby, the mean time from "idea to implementation" seems to be a lot less. I have an idea, I produce some code, the idea is tested. In java, this process seems to take a lot longer. (Projects take a lot longer too)

Coming to Ruby like traveling and staying in a well appointed hotel. Things were where I expected them to be, do what I think they should do, and have names I don't have to remember (because they make sense). Java just doesn't seem as natural.

Ruby, and in particular Rails, seems to have solved the recurring development problems a lot better than the Java alternatives I've used. It's less of an exercise to find a solution, download and trial it, and make a decision as to whether it meets your needs. Plus, Ruby and RoR are driving some very exciting innovation right now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic