This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ruby and the fly likes What advantages does Ruby hold over PHP and Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "What advantages does Ruby hold over PHP and Java?" Watch "What advantages does Ruby hold over PHP and Java?" New topic
Author

What advantages does Ruby hold over PHP and Java?

Andy Daykin
Greenhorn

Joined: Feb 01, 2008
Posts: 16
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

Joined: Aug 16, 2009
Posts: 13
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


Ruby training coming up in September! David A. Black and Erik Kastner team up for fast-paced, four-day Ruby intro, in New Jersey, September 14-17. See http://rubyurl.com/vmzN or contact David.
Michael Sullivan
Ranch Hand

Joined: Dec 26, 2003
Posts: 235
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.
 
Consider Paul's rocket mass heater.
 
subject: What advantages does Ruby hold over PHP and Java?
 
Similar Threads
Trying to get JSP over PHP
Advantages of Ruby over Java
Java Over Php and other technaologies
Ruby vs other scripting languages
Ruby in Practice - Ruby as a first choice