Here's my situation: I'm an ASP.NET Developer first and foremost. That's not going to change anytime soon. I have built my small business on it. With that being said, I'm looking to add other technologies to my arsenal. Not just for learning purposes, but to one day be able to offer clients an alternative solution. For this reason, I have gone back and forth between the PHP/Framework world and Ruby on Rails.

I'm going to list a set of pros and cons that I have found with each, based on my research and personal needs. I'm hoping you can be objective as you read through these, share YOUR personal experiences, and then provide me with advice.

(running Mac OS X)

Ruby on Rails

-Ruby is OOP through and through
-Ruby and Rails was a piece of cake to setup for development
-Rails Framework is modern and encourages the best practices for today's web dev
-Cutting edge and has influenced major competing technologies to push the envelope like PHP Frameworks and now ASP.NET MVC
-Convention over Configuration makes development a bit easier, cleaner, and more efficient
-Very Agile

-It's a moving target. AWDWR book was just released and already there are changes in v2.3 that make the book dated. And the Rails/Merb team are gearing up for 3.0. Yikes!
-Hosting. Although, this may be improving (haven't done a ton of research here)
-Not a lot of jobs from what I've seen.
-Documentation. This appears to be getting better though. The Rails Guides is very promising but it's still a pain point I believe.
-Rails almost has too much 'magic' for my taste

PHP [insert Framework here]

-It's been around forever. So the community is HUGE and the documentation is plentiful.
-Options. You can code without a framework, roll your own, or use any of the several popular ones out there.
-Jobs. Probably THE most popular technology powering websites out there. I don't think there is or will be any shortage of PHP work.

-Because it's been around forever, it does seem to suffer from spaghetti code with its procedural programming roots. OOP functionality feels like a band-aid.
-The bar to entry is very low, so naturally there is a lot of bad code out in the wild.
-Syntax is just ugly.

That's what I have right now. I'm really torn. Again, I want to pick up one of these so in the future I have more options. What would you suggest?


I wouldn't say that PHP's syntax is 'just ugly'. It takes a while to get used to, but you will be amazed at how elegant it is :) I personally like PHP but am going to investigate RoR during the oncoming summer, so you have no idea how much you've helped with the list of pro/cons for RoR. Thanks

I imagine when Java showed up a bunch of COBOL guys were sitting around saying: You can write beautiful code in COBOL, it's easier to get hosting, I've heard Java leaks memory and supports Nazi war criminals, it's much easier to get a job with COBOL, COBOL is more mature and stable, the Java interpreter has all this magic stuff going on, blah blah blah

Written by DigitalRoss

Having coded in both, Rails is more elegant than PHP. I haven't played with any PHP frameworks, though, and some of which, I hear, has MVC features. Rails, being based on Ruby, has more of a programming feel, while PHP, being only loosely based on Perl (which I love) and C (I believe), has a more duct tape of features and "features" feel to it. As an added bonus, Rails has built in testing features.

one reason I hate PHP syntax is because it uses the under_score instead of camelCase

Written by adardesign

Accepted Answer

I was exactly where you are now. It came down to picking between Rails, Codeigniter, and CakePHP. I decided that I wanted to go with PHP, because the hosting was cheaper. I learned that I love codeigniter. It's simple, clean, fast, big community and has great documentation.

On later projects I started using Rails and fell in love with programming all over again. Rails is so nice. I would use rails anywhere I could.

When it comes down to it... Cake PHP, Codeigniter and most other web frameworks these days are copying Rails. Why not use the original?

Written by Kevin Kaske
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki