Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

What advantages does Ruby hold over PHP and Java?

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.
Posts: 16
  • 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.

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.
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic