7 reasons I switched back to PHP after 2 years on Rails - O'Reilly Ruby
oreillynet.com
oreillynet.com
Would have been nice to read more about the mismatch points between Rails and legacy code. Was this a legacy DB structure that couldn't be loosely coupled to the Rails side, e.g., exposed as an internal REST service?
I also wonder if others can just as easily extend his code than if he had used a well-documented framework like Rails. In any case, it's impressive he rewrote the whole system (doesn't look like a small web app) in 2 months.
But when I do, it's usually just 5-20 lines of code that's not that complex to grok. (but you're right, not many comments inline) It would not be fun to try and decipher RoR internals as a new ruby programmer.
If you think rails internals needs more documentation and can help, check out the Rails Documentation project:
It sounds like he was trying to using Rails to retrofit on to an existing PHP DB schema, which is an obvious nightmare and probably a stupid idea in the first place.
Once that is complete though, its pretty much Rails business as usual.
This might not be practical for all applications. But, in looking at CDBaby, I would find it hard to believe that their data is all that complex.
The correct link is here, please update it and delete me. http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_swit...
And it's odd that this post has 2 points while being a 404.
Coding in another language like Ruby helps improve programming skills tremendously. But then it makes sense to apply those improved skills and learned design patterns to code PHP apps.
Unsupported blanket statements don't contribute anything useful to the discussion.
I don't have any numbers off hand(I will find some when I have some free time) but I would assume PHP has 10x more large scale websites than Rails.
That's case closed for me. Although Rails is nice and fun. But if I have to make a business decision today, its PHP all the way.
Let's assume you're right, and that there are ten times as many "large scale" (whatever that means) websites running on PHP as Rails. That might mean that an equal number of people have tried building large scale websites using PHP and Rails, and that ten times as many failed using Rails as PHP. Do you think that's the case?
5 minutes of searching on Google fails to return any conclusive numbers, but PHP certainly seems to be several times more popular than Rails. PHP has also been around for 13 years, while Rails was first released to the public just three years ago. Both have been gaining popularity since their introduction, which suggests an explanation for the greater number of large scale PHP sites having nothing to do with the suitability of the tools: PHP has been around longer and has more users. If you want to measure like that, you should be programming in Java, not PHP.
The number of projects attempted and failed with a given toolset is a much better indication of its suitability than overall popularity. Even that can fail though. I suspect a greater proportion of Rails projects succeed than PHP, but I don't think Rails is the reason in a direct sense. I think the sort of people who choose Rails are more likely to succeed than those who choose PHP.
I'm sorry I don't quite get you here. Could you clarify this statement...cuz it sounds a hell alot like the elitist BS that is being peddled around by Rails fan boys as of late.
I had this crufty old php4 app that started gathering dust because it was so painful to touch.
The thought of rewriting all of it in ruby was just too painful, as well. (and not worth the effort) Like Derek's story, it wasn't just the customer-facing site but all of the little helper scripts, admin control panels and everything that were in PHP.
PHP definitely can be used in a reasonably professional way, you just won't get a lot of examples of it being used that way in books or in code you'll come across on the Internet, usually.
Probably most of the people who know how to use PHP as well as it can be used work at Yahoo.
Edit: I took a look at the site in question. It's simple, fast and mostly well-designed, but the fact that it required 12k LOC and 2 months when he had the best possible functional spec (a working, but internally messy old version) doesn't give me much faith in his abilities or recommendations.