Topic: 7_reasons_i_switched_back_to_php??? what do you guys think of this?
I am new so I can't really say much about this topic
so those of you who has more than 4 months of rails please share your opinion with us.
You are not logged in. Please login or register.
Rails Forum - Ruby on Rails Help and Discussion Forum » General » 7_reasons_i_switched_back_to_php??? what do you guys think of this?
I am new so I can't really say much about this topic
so those of you who has more than 4 months of rails please share your opinion with us.
I think he's a wanker.
What could he possibly not do in rails in 2 years that he could in PHP in 1 month?
It's this giant diatribe with ZERO real examples of why PHP is better for what he's doing.
And, the end all of it is, what? Rails isn't a giant hammer that will smash every nail? Like duh, obviously.
Oh, and will someone explain why he writes the O'Reilly rails blog when he had to HIRE someone to code rails for him?
Last edited by BJClark (2007-09-24 15:44:34)
It is his "opinion" and he's intitled to it but IMO he needs provide examples of what he can and can't do if he wants his post to be taken seriously.
I think quite a bit of the problem may be he doesn't know how to use Rails.
Moved to General Discussion
There are probably projects that Rails is better suited for than PHP and vice versa... but nothing seems terribly complicated about CDBaby, and when you're working with one of the best rails coders around for 2 years and can't come up with anything you're probably doing something wrong (and using Rails isn't it).
I read about it on slashdot first, which was a complete flamebait. Saw an interesting comment there, though. Compare the headlines in that comment to the headlines of the actual article, and Alas!
Also, the author sort of agreed on this. After all the flames and foos and bars, he replied to the slashdot article himself. As he says, he was trying to make rails do something it wasn't meant to do. No wonder he switched back!
I've said it before around here, but this is a good example of programmers vs. software developers. To a programmer the language is the solution, to a software developer the language is the tool. A software developer with either a degree or a few years of experience *should* be able to change languages and write functional and acceptable code in any language with some good reference material. Thats not to say that they will be able to use every feature of that language, just write good functional code with it.
In this case we had a programmer who was focused on the language as the solution and not on a good design, a plan, and an understanding of the problem. He did wonderful work in PHP (according to the article) but was crippled when a new language was introduced.
When solving any problem you have to focus on the problem and not the tools you have. You should consider the tools you have when designing the solution, but those tools should not dictate the solution.
On top of a good developer CD Baby could also use a good designer. When I looked at the site it looked like a link farm, ugh.
People really blow these types of articles and debates out of proportion. This guy is partially to blame by writing such an incendiary title.. to most folks it sounds like he is saying "I tried to use Rails and it sucked so now I'm using PHP, which is much better"
But read the article and you will see that his problem was dealing with a MASSIVE legacy database and admittedly not understanding how Rails works. He complains about not being able to use SQL transparently in Rails, obviously he never used the execute_sql command which has been in ActiveRecord since forever.
At the end of the day, if PHP works better for him, then that's awesome. Personally, I found the language quite repulsive and counter-intuitive, but that's just me.
If you are a fence-sitter who cant decide what language to use on a project, then you need to try making something simple in both languages and then decide what works better for you.
I tried PHP, C# and Python before settling on the sweet simplicity of Ruby and Rails.
Some say choose the best tool for the job, I say choose the best one for your brain.
On top of a good developer CD Baby could also use a good designer. When I looked at the site it looked like a link farm, ugh.
Haha, looks like they agree ... check out their footer.
I think DHH's response (or what I take to be his response) makes a lot of sense: http://loudthinking.com/posts/13-thinki ig-rewrite
The switch back to PHP had more to do with The Big Rewrite than with Ruby/Rails itself.
That being said, he's right that PHP might be more flexible than Rails - but that might simply be because PHP is a language - not a framework written in a language. Notice that he didn't do his rewrite with Code Igniter or Cake PHP - he wanted to roll his own thing. Fair enough.
Don't forget, he was using his existing database structure I believe. This wasn't start again from scratch - and he says he would be interested in starting from scratch on another project with rails.
I am currently rewriting a large PHP site in Rails. It's almost done. Here's what I have to say about it:
1. It's 10x fewer lines of code.
2. That's even including the tests which the old site had none.
3. The logic is nicely packed into models, the old site everything was mixed together.
4. It's much more flexible and easier to add/change things.
5. Most importantly, it's fun to work on.
I don't know how you can't say that's better. For anyone attempting the same thing, here's what I have to say:
1. Big rewrites are scary, only do it if you really need to. Estimate the time you think it will take and double that.
2. Don't try to keep the same database schema, url structure, etc. (anything Rails has an opinion about).
3. However, keep the same feature set, requirements, and interface. Don't try to add anything significant during the rewrite. If you need to change something, only do it because it'll make things easier.
4. Follow the Rails conventions, don't fight it!
It sounded like these issues all played a part in his big rewrite.
Though generally, it's Sacrilege to bring back a thread three years old, in this case it makes sense. Derek Sivers recently spoke at Railsconf2010 - on the specific topic of Rails/PHP. You can watch his presentation here: http://www.youtube.com/view_play_list?p 649BB3813D
The main sticking point is that he's moving back to Rails, and will use Rails3 for everything going forward. Interesting change of events.
Last edited by expectationgap (2010-07-29 13:03:49)