Well, I imagine that this opinion piece by Derick Silvers will cause some conversations: 7 reasons I switched back to PHP after 2 years on Rails. The gist being that a big bang rewrite of an existing code base is always a risk and that Rails is optimized more for the greenfield case. He talks about the beauty and power of coding in native SQL instead of database abstraction layers. I am sympathetic to that idea. He mentions hosting in that PHP is small and fast. To which I would add widely available and well known. He asks
IS THERE ANYTHING RAILS/RUBY CAN DO THAT PHP CAN’T DO?
And answers No with the comment
…when I took a real emotionless non-prejudiced look at it, I realized the language didn’t matter that much.
Now I disagree a bit here. It just happens that Ruby and PHP are equivalent in many of the ways that are important. See my post on comparing languages. PHP has some advantages with maturity, while ruby has some constructs, such as closures, that can do wonders in the hands of a skilled programmer. Yet, Ruby also has some disadvantages. I’d summarize that by saying it has all of the maintainability of perl with the commercial attitude of smalltalk.
One of the biggest themes of the 7 reasons piece is that he was able to bring much of what he learned from his 2 year failed rewrite in Ruby back to his PHP version. But, PHP is a different world today than it was two years ago when he made the decision to leave it for Ruby. PHP 5 is a more viable option. Additionally, the PHP community has learned from Rails. Some of the things that made the Rails framework a step ahead, for example routing and url helpers, are now widely available in the PHP world for those who want to use them.
Welcome back, we kept the light on.
I understand the maintainability of perl, but not so much the commercial attitude of smalltalk. Are you implying that Smalltalk never had good vendor-y, commercial support? Kinda like Ruby today? Because that’s not true; in the 90’s the only way to play with Smalltalk was to buy a very highly priced runtime from a vendor. Ah … those were the good days; I worked for one of those vendors.
[...] Jeff Moore has related and insightful comments. [...]
Hi Jeff –
Indeed; the same is true (perhaps more so) for Rails itself, which was built at a time when the dominant PHP version was still 4.x.
[...] Jeff Moore – “Ruby versus PHP or There and Back Again” [...]
I appreciated his article and thought it was written very well. The one thing that I particularly enjoyed is his statement about SQL. Everyone thinks they need to avoid it like the plague, I happen to really enjoy it. I have found with Ruby that most of the time I end up using the find_by_sql statement because I have more control of the performance and end result. I did the same when I worked with PHP.
You are also correct in that PHP has matured over the past 2 years.
Amen!
Oh come on Jeff, you’ve got to know that languages are just a vehicle and in the grand scheme of things don’t really matter that much… Well, unless you’re showing up to race a formula one event with a Pinto
Seriously though, its ashamed to see people drop Ruby – or any language really – simply because the framework they chose didn’t work out for them. It’d be like dropping PHP because (insert favorite framework, Zend, Cake, Solar, CodeIgnitor, etc.) didn’t work for them.
[...] * Elizabeth Naramore – “Derek Sivers’ Article on RoR vs PHP” * Paul Jones – “Is there anything Rails can do that PHP cannot do? *No.*” * Terry Chay – “Why PHP triumphs over Ruby” * Jeff Moore – “Ruby versus PHP or There and Back Again” [...]
[...] Ruby versus PHP or There and Back Again [...]
[...] Ruby versus PHP or There and Back Again – Professional PHP [...]
[...] Ruby versus PHP or There and Back Again [...]
[...] Jeff Moore – “Ruby versus PHP or There and Back Again” [...]
Well, what would you suggest for a newbe?
I want to program for website developing,
I know a bit of PHP coding, and want to go with programing seriously.
Will it be wise to invest all efforts on PHP or go with the Ruby?
Thanks,
Amit
It’s true, there’s not much that Ruby can’t do tbh.
Coupled with the fact that you can do a large amount of the boring stuff quickly & easily it gives you much more coding time to pump into the stuff that matters.
Me too was hearing about the Ruby on Rails for a long time . I was thinking whats inside it ? And does it have more power than PHP .
. Am I right ?
I thought of reading about Ruby on Rails , I came to know that Rails is a framework to support Ruby language .
Like Rails PHP too have a list of frameworks , like zend, cake, symfony , codeigniter etc.
Then why I need to switch to Ruby
I hope PHP with some frameworks can do what Ruby with Rails is doing .
Thanks
[...] Ruby versus PHP or There and Back Again [...]
For the moment we use Codeigniter and we are happy with it…but seems like Ruby “can do wonders in the hands of a skilled programmer”. Do you think that i should adopt Ruby if i m not a highly skilled programmer?
Spectacular, I’ve been looking for something this good. I’ll subscribe for more later