Can you tell me why Ruby on Rails is better than PHP?
Ruby on Rails was created with programmer productivity in mind.
That’s why it is the language of choice in Silicon Valley. Twitter, Groupon and a number of other Web 2.0 sites were built in it.
In contrast, PHP was intended for server support, so it is not as good when creating apps. However, PHP is still used on millions of web servers.
I’ve heard Ruby is superior.
It is not perfect. Ruby did not support Unicode until version 2 in 2007.
Ruby is on version 4, the fourth or fifth version since 2004. It is incredibly stable.
Good, because it is not really backward compatible. Later versions of Ruby rarely work with prior ones.
Ruby on Rails tends to focus on the future.
Upgrading Ruby versions is not as simple. And when you upgrade Ruby, things tend to break.
Ruby’s framework Rails makes it easy to re-write apps as necessary.
That is one strong advantage of Ruby. It was developed simultaneously with the Rails framework, whereas PHP users have a number of frameworks to choose from.
Do you like the range of options?
It sounds nice until you realize the people whose apps or servers your application has to work with may be following a different framework. And frameworks designed for other languages or niche infrastructures may not work with the language you want to use.
Whereas Ruby on Rails has a standard language and standard framework.
That does not eliminate all the guesswork. Reading and understanding the code of others is challenging, even ignoring the single and double at signs.
Productivity matters, especially given the cost of programmer talent. And speed matters when you want to get new apps to market or upgrade what you’ve got.
I’ll admit that the standardized language on a standard framework simplifies testing. And Ruby is finally mature enough to have a suite of automated testing tools to make things easier.