Why all this fascination with Ruby on Rails?
The success of 37signals...these guys have built some cool stuff in very small teams.
But in general I believe that a lot of the coding developers (as opposed to user interface developers such as myself) like trying new languages like some men like trying fresh girlfriends.
Each time a new language comes along they think this might be the one.
For those of us just trying to produce working applications efficiently for clients, switching languages is a waste of time and money.
i.e. we will switch but only if the incentives are enormous or our current technology has badly dated.
Many developers are choosing to remain in PHP. CakePHP is PHP's answer to the Rails framework on Ruby.
Dominican developer Kevin Lloyd has written a succinct list of the reasons to choose CakePHP over RoR:
- shared host support
All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise....there shouldn’t be doubt in anybody’s mind at this point that Ruby itself is slow. It’s great that people are hard at work on faster implementations of the language, but right now, it’s tough. If you’re looking to deploy a big web application and you’re language-agnostic, realize that the same operation in Ruby will take less time in Python. All of us working on Twitter are big Ruby fans, but I think it’s worth being frank that this isn’t one of those relativistic language issues. Ruby is slow.
I don’t do Web Development for my health or for fun. I design web applications for clients. A lot of my work involves redesign of already existing sites. How do I say to a client: Hey, although your current web host that you’ve prepaid a year for is sufficient for 90% or the stuff you can throw at it, I’m using this new technology and you need to shell out some more $$$ for a host that can handle it.
That's our situation as well. We love web development but it is a means to an end. User interface, front end, user convenience. Of course reliability and security are very important to us as well, but that is more a question of coding practice than coding language.
And who the hell like slow applications anyway. Speed would be one of my biggest gripes about Basecamp (poster child for all RoR development).
Why is PHP faster than Ruby on Rails slow? According to Kevin:
Because everything in RoR is an object, it has to be instantiated, which takes up CPU time and memory. Even empty objects. With PHP and empty array is a memory address, that’s it. Although CakePHP does support OOP using PHP5, most of CakePHP’s data manipulation is still heavily array based.
But in the end who cares why Ruby on Rails is slow...
We've been looking at additional project management tools lately. One of the best looking is Connector from Joyent. One look at the graphics and I was almost hooked. But it has to be the slowest web application I've ever had the misfortune of demoing.
I thought the demo accounts might just have shoddy hosting (although that is shooting oneself in the foot), but no, apparently the developers themselves have to wait 15 to seconds to 60 seconds for pages to refresh. Who has time for this?
Coding is supposed to set us free to spend time with our girlfriends not to spend learning new development languages.
For the most part, swapping girlfriends is a waste of time. If the one you have is kind to you, stick with her. We'll be staying with WordPress and PHP a good while longer.