25 Sep
Rails Fan Boys Missed The Point
I’m sure I’m not the only person who has been talking about this, but the response to Derek Sivers talking about how he switched back to PHP after 2 years of trying to rewrite CD Baby using Rails has been so predicatably idiotic. He even hired a Rails expert to help him out. Not what I would’ve done, but whatever. So, he had the courage at some point to pull the plug on it and got down to work rewriting his app in PHP. 2 months and 10K lines of code later, he was done. 2 years vs. 2 months.
Now, other people have done a much better job of deconstructing the childish, immature responses that basically seem to imply that Mr. Sivers’ is an idiot (which he clearly is not) and that Rails is perfect and that he must be doing something wrong. But that’s not what I’m here to discuss today. His experience is not atypical in the software industry. Many have been seduced by the promise of a new tool and have failed to anticipate that some of the same problems they were hoping to fix were going to show up no matter how hard they tried. And woe unto anyone who chooses to criticize that technology, as they will be flamed mercilessly for not accepting that the new is better than the old.
Anyway, the guy I feel bad for is the Rails expert Mr. Sivers’ hired. He was being asked to shoehorn an existing application into not only a new language but probably a new paradigm. Was the old CD Baby a prime candidate for a rework using a framework that relies heavily upon convention over configuration in order to gain development time? Legacy apps are very hard to rewrite when you didn’t create the original. Sure, Mr. Sivers was helping the Rails guy out but there was no way he (the Rails guy) could get this done. Mr. Sivers just knew way too much about all the hackery that inevitably creeps into an app to get it to work and no amount of time could get that info out of his head and into a form that Rails Guy could use.
Of *course* Mr. Sivers could rewrite this thing in 2 months. He knew all the intimate details. How could he *not* succeed? He had thrown away 2 years worth of work but was able to get it done in 2 months by himself. All he really had to do was go back and recognize the mistakes he had made and what was the simplest way to implement the functionality he had already written before. But here’s the kicker: he knew how do it better BECAUSE of what he learned while doing Rails.
As I told my friend Kevin, the end result of all my talks on “What can PHP learn from Ruby on Rails” was me being able to stand up and say “there is nothing I can’t build in PHP that I can build in Rails, but thanks for showing me all those best practices.” That, my Rails fan boys, is the real lesson to be learned. Keep all that “PHP is ugly, Ruby is beautiful” nonsense to yourself and just build something with it. I’ll be humming along building PHP sites using all those cool things I learned from Rails. You want to use Rails? Great! I’ll be here working on my PHP stuff, let me know when you run into an application-level problem Rails can’t solve because I’m willing to bet it’s been solved with PHP. Numerous times.
Article Tags >> CakePHP || PHP || rails
Posted by Gustavo Carreno on 25.09.07 at 5:08 pm
Hey mate,
I quite agree with you.
Not just because I read what you had to say but just because I felt something was wrong with that post. I couldn’t put my finger on it but all that jazz about Rails is bad, PHP gives me power was somewhat flawd.
After having read your post I can now say that you have put the finger on it.
Thanks, grumpy, for getting me out of that ARGHH fealing about that post.
Gustavo Carreno aka [Batch]
Posted by Tony on 25.09.07 at 5:08 pm
My experience with ruby is limited, and I only have a conceptual knowledge of rails. One thing I have noticed though is that a lot of rails sites share a similar look and feel. For better or worse, it seems to fit a project into a certain mold. Am I wrong in saying this? I guess that’s true with any framework, right? While I heard on some podcast that “rails is only good for building site that look like a blog”, this is definately an exaggeration… but maybe CdBaby didn’t fit well within the mold that Rails encourages? Your thoughts?
Posted by Brendon Kozlowski on 25.09.07 at 5:08 pm
“I’ll be here working on my PHP stuff, let me know when you run into an application-level problem Rails can’t solve because I’m willing to bet it’s been solved with PHP. Numerous times.”
I’d like to do some operator overloading with my objects in PHP.
Sorry, as a PHP user, I couldn’t resist - it’s one of the things I’d like most that would be rather impossible to implement in PHP’s engine properly, from what I’ve heard.
Posted by Brendon Kozlowski on 25.09.07 at 5:08 pm
…just to add to that, I fully agree with what you said. I don’t want anyone to think my reply was meant as an immature poke, it was simply a humorous gesture only. Thanks for the story about CD Baby!
Posted by Chris Hartjes on 25.09.07 at 5:08 pm
@Tony
It does appear that certain types of sites appear to be a good fit for Rails - mostly the CRUD type. That’s no slight against Rails, that’s just what it’s really good at. When you need to build an “application” that is doing more than just CRUD then that’s where PHP shines. Rails does give you some good benefits, but I think it’s become obvious that it’s very hard to move a legacy application with a database structure that is not initially Rails-friendly to Rails from another language.
@Brendon
Well, I don’t know that I would call an inability to do operator overloading an “application level problem”. More like a “nice to have feature”
Posted by JadB on 25.09.07 at 5:08 pm
My own tribulations with RoR wouldn’t be enough to give a clear cut judgement - shortly after I started, I discovered CakePHP and never looked back.
What I like most about RoR is it’s online-media-boom that, IMO, raised the bar higher for many PHP developers and triggered the beginning of a new generation of frameworks. So thanks to that RoR!
And Chris, I can’t but agree with you when you say:
All those big RoR sites out there are nothing but CRUD, starting with 37Signals own apps.
Posted by Les on 25.09.07 at 5:08 pm
> let me know when you run into an application-level
> problem Rails can’t solve because I’m willing to bet it’s
> been solved with PHP.
I couldn’t have put it better myself. Well done for an excellent post (just subscribed to your rss the other week there).
I live and die by PHP but I ain’t going to start a flame war (I’ll leave that to my own blog) but everyone needs to realise that Ruby on Rails isn’t the holy grail.
Maybe this experience will start to waken a few people up now…
Posted by Mariano Iglesias on 25.09.07 at 5:08 pm
@Chris: I think operator overloading is a cool feature to have, though nothing that can’t be achieved by using interfaces in pure PHP5, or even better, who knows if it won’t be added in PHP7 or something…
But to tell you the truth, if we would have operator overloading availability I would use it heavily.
Just think:
$a = array(1, 10, 20);
$b = array(2, 15);
$c = $a + $b;
Or in CakePHP instead of doing:
$data = array(’Model’ => array(’field’ => ‘value’));
$saved = $this->Model->create($data) && $this->Model->save();
to create a new record, you could just do:
$data = array(’Model’ => array(’field’ => ‘value’));
$saved = $this->Model + $record;
I know, seems like a nice to have
Posted by Philip on 25.09.07 at 5:08 pm
It seems to me that you’ve missed a great opportunity to raise the level of the discourse by refusing to descend to the level of the Rails proponents you criticize. Why not just tacitly acknowledge that not all Rails users are as dogmatic as this particular subset, suggest that we all tune out the shrill religious adherents, and move forward in the understand that frameworks are extremely valuable whether implemented in Ruby or in PHP (even if we each have our favorite languages)?
It seems to me that your general tone, backed up by the intentionally pejorative term /Rails fan boys/, has more in common with the people you’re criticizing than you’d probably be willing to admit. If your goal is to escalate an already full-blown religious war, replete with all the inflexibility that comes along with that, then more power to you. You’ll probably be successful. But if your goal is to appeal to the pragmatic 95% of us then I think you’re missing the mark.
I mean, I love Rails. I’d use it every chance I could. But when, like Derek Sivers, I want a platform that’s somewhat compatible with my legacy code then I’m very grateful for PHP frameworks. Seems like a win-win, but maybe I’m hopelessly naive and need to be picking a side to cheer for. *shrug*
Posted by Chris Hartjes on 25.09.07 at 5:08 pm
@Phillip
I think you’re missing my point: Rails *is* a good framework, but the ideas behind it are more important than the framework itself. As for the “tone” of my blog, well, I tend to write what I think and the “fan boy” type is much more prevalent in the Rails community than in the PHP community. I’ve no interest in a religious war that has no winners, only casualties.
Posted by Les on 25.09.07 at 5:08 pm
> I think and the “fan boy” type is much more prevalent
> in the Rails community than in the PHP community.
True, however there was that same mentality a few years back with PHP Java although things have settled down now from the PHP camp.
I think it’s more to do with that fact that PHP has become more accepted as a safe platform to develop with, it as a platform is taken more seriously now.
You could say PHP has matured and come of age I suppose?
But Rails [and Ruby for that matter] isn’t PHP as the two platfoms are very distinct in their nature, so how long it’ll take Rails to mature is anyone’s guess.