Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a program coordinator for a course I plan to teach who wants to change the "Introduction to Web Development" course from using PHP to Ruby (I assume he means Ruby on Rails). His justification is that Ruby "is the future of web development". Because we can't argue about the future, only trends, I'm hoping to build an argument against this instead based on "teach-ability".

My personal experience in learning both PHP and Ruby on Rails is that PHP was more natural to ease into, simply because you can start inserting code wherever you need to and gradually improve your code structure and organization from that point forward. Ruby on Rails however requires a significantly sharper learning curve on code structure and organization (in my opinion). However, I learned Ruby on Rails much later in my programming career, so it was much easier to pick up than a first time student.

So my question is, what language would be more appropriate to teach a beginner course on web development given those two options?

share|improve this question
First of all, Ruby on Rails is a framework, you can do web development in Ruby without it. Probably not a good idea, but still not impossible. –  Yannis Rizos Feb 28 '12 at 0:23
@YannisRizos My understanding about Ruby was exactly that, there is too much overhead to do web development without the web framework. –  Resorath Feb 28 '12 at 0:25
That's very close to my understanding of it as well, however on an introductory course you will need to teach the language... So the course would be on Ruby, even if most of it will be around Rails. –  Yannis Rizos Feb 28 '12 at 0:28

1 Answer 1

Both PHP and Ruby are perfectly suitable for an introductory course on web development, as is Python and quite a few other languages (yes, Perl included). But if you read the top voted answer on the illustrious "What should every programmer know about web development?" question, you'll see that the language itself doesn't matter (much).

Personally I've taught all my web courses in PHP:

  1. I'm more familiar with it than Ruby. In the end that's what matters most when teaching a course, if both languages are valid, go with the one you know best.

  2. PHP is more marketable than Ruby, where I live. It might not be the same for you.

  3. The learning curve is indeed smoother. The PHP manual is a wonderful resource, and the templating nature of PHP makes it quite easy for a beginner to build something exciting in a couple of hours.

  4. Although both languages appeared in 1995, PHP as a platform caught on quite earlier than Ruby, which translates to an abundance of mature open source projects. You can have your students set up a Wordpress blog or a Joomla site in minutes, and get them excited early on. And when you decide to teach MVC there are a thousand and one frameworks you can choose from. More importantly there are some very cute micro frameworks that are ideal for teaching.

All that said, Ruby has quite a few advantages as well, it largely fulfils its promise of least astonishment and it's a beautifully designed language. PHP, if taught incorrectly, can forever damage the fragile noob mind.

It's not an easy choice, and it's one I never had to make as an instructor. Use what you know best always prevailed, and I think that should be the basis of your argument. If that doesn't work, through some Perl into the discussion, that's always fun ;)

share|improve this answer
"PHP, if taught incorrectly, can forever damage the fragile noob mind." - +10 if I could –  tdammers Feb 28 '12 at 7:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.