By Matthew Magain

The State of Web Development: PHP developers most likely to switch to Rails

By Matthew Magain

Of all the graphs in The State of Web Development 2006/2007 report that SitePoint and Ektron published recently, the one that stood out the most to me was the one showing the platform currently being used by developers planning to start using Ruby on Rails:
A graph of developers who have indicated they will start using Rails. The graph shows that PHP is by far the platform most used by these developers

It wasn’t the fact that the graph shows PHP developers to be likely to start using Rails — this makes sense, as someone is more likely to experiment with another open source platform if they’re already using another open source platform — it was the fact that PHP developers are more than three times as likely to start using Rails, even more so than Java developers!

This surprised me, because it’s the Java developers that the Rails movement is targeting (note: purely my own observation, based on the Rails tagline of being able to write “real-world applications with joy and less code than most frameworks spend doing XML sit-ups”). To a Java programmer, Rails might well look like a much simpler way to achieve the same result. But to a PHP developer who is only used to hacking together small apps?

So here’s the question: do PHP coders know what they’re getting in for? Not to suggest that all PHP developers are burrowing away in an unstructured manner (we all know there are plenty of PHP frameworks these days that provide MVC separation and other similar benefits to Rails), but I wonder how many PHP developers are actually using them. Looking at some of the code out there, my guess is less than half.

Java programmers on the other hand are already more disciplined, if only by the fact that a standard at least exists for structuring Java web apps. So are the PHP developers who are keen to move to Rails the disciplined developers, for whom Rails may be a natural fit? Or are they the hacks, who have yet to embrace any structure in their web apps, but are dazzled by the various beautifully designed Rails apps, and impressed by the charisma of Rails’ leading evangelist?

My guess is that it’s the latter, and my message if you’re eager to jump ship: be prepared to feel disoriented. I’m currently midway through editing SitePoint’s upcoming Ruby on Rails book, and while spending so much time in Ruby-land has definitely been good fun, there’s no question that coding in Ruby requires a completely different mindset. Once you’ve made the shift, things become quite intuitive and almost a pleasure to write. But if your previous experience with object oriented programming is just the square-peg-in-a-round-hole approach that PHP provides, Ruby can be quite a headspin. A good headspin — like the buzz from riding a roller-coaster — but a headspin nonetheless.

Disclaimer: Matthew Magain is a co-author of The State of Web Development 2006/2007.

  • ikeo

    I think its interesting that the top three coders that are likely to use the Ruby on Rails are Perl, PHP and Python … all open source/free programming languages. Maybe the PHP number is higher because there are simply more people using PHP than any of the other languages?

    As for me, I don’t really like Ruby, but I feel I owe it to myself to at least find out what all the noise is about.

  • FWIW, the page for the upcoming Ruby/Rails book has content referring to the Ajax book :)

    I’m a PHP dev, and I am looking to Rails, simply because PHP is such a hard slog.

  • Ack. Thanks mahke, fixed.

  • Nice job on insulting a huge portion of the SitePoint user base.

    David Heinemeier Hansson was a PHP user. He designed Ruby on Rails. Henceforth, think about the correlation here.

  • What exactly is it that you’re insulted by, charmedlover? The suggestion that there are a lot of beginners using PHP? Probably moreso than other languages?

    I’m a PHP user too. If you fall into the structured programmer bucket, good for you. But suggesting that all PHP developers are disciplined, or ignoring the fact that PHP also attracts beginners, is just naive.

  • chrisb

    nice graph.. loving the attention to detail in the labelling ;)

  • er, I would say that most PHP developers are undisciplined… I’ve had the “pleasure” of working with PHP code that looked like it was written by brain dead monkeys, and usually I ended up rewriting most of it.

    On topic: I tried Rails and moved on… all right, you write less in Ruby, syntax is clean enough, there are some very nice features, but what about performance and scalability (no, don’t come with bazillions of mongrel instances running, or lighthttpd + fcgi, that’s way too hacky for my taste)? And activerecord can’t do much regarding complex database queries, jut like Propel can’t do much about it (using a proper database some things can be implemented using views and triggers, but many times you don’t get to choose the database)… If I was to switch to something, I gues it would be Python: Django’s model is simply brilliant, the templating system is well designed and somewhat similar to Smarty, performance is good, and you also get a cool database admin interface as a bonus ;).

  • I’m in a similar situation as m0n5t3r; Most of my background is PHP oriented, tried RoR, didn’t “get” it and now looking at Python/Django

  • Confused

    Re your Google code URL: Why exactly are $_GET and MVC frameworks incompatible?

  • steve_

    The title of this post is misleading.. and so is the wording in the post.

    The graph results *don’t* actually show that “PHP developers are more than three times as likely to start using Rails”. The graph ONLY shows that three times more PHP developers are PLANNING to start using Rails.

    This article draws a conclusion it cannot make.

  • another possibility: a lot of PHP coders are using shared hosts, and a lot of shared hosting plans are starting to add Ruby to the arsenal of offerings. so access + buzz = “i plan to use/switch to rails”

  • michel

    Ruby (and Rails) probably have an appeal for more experienced PHP developers as well. If you’re interested in object orientation and dynamic language features Ruby has a lot going for it. I know I sometimes feel a bit frustrated by PHP’s limitations in these areas.

  • I will only turn to RoR when:

    * It is easy for the “laymen” to install under an Apache server and doesn’t require understanding how .so files and the FASTCGI server works and integrates.
    * It stops locking mysql databases when your on a WinXP platform (it did this so much I stopped using RoR)
    * A majority of Hosts provide it without me understanding, reprogramming apache server files, like many servers require me to do.

  • There are many robust apps written in PHP by developers who know what they do. A very good example for a very extensible application that is not object oriented is the Drupal CMS. Smart people can also do without OOP.

  • Nick

    This whole thing seems a little too biased towards Ruby. I think that there are probably more PHP developers who are considering a move to Java, but that is just a guess on my part.

  • hdsol

    Tough Room. I think that everyone needs to look at this for what it is. There are a high number of php developers who are looking at ROR. As one of the many php users out there, I can say first hand that a lot of coders of php are not very disciplined or experianced. We have all had to decipher sloppy code. That being said , alot of the active posters here are posibly more expericed programers who more fully understand what and how they are doing it. Just remember that more of us returned the survey and the posts here may not represent the other side.

    I think that Matt was just showing a suprising bit of information and not trying to put off or down the php people in the room. Just remember that there are a lot more viewers with little experiance and may be intimidated to post. Like I tell my kids. Its only easy of you know it!

    I take this away from the whole blog including the posts. A lot of people are looking at moving from php to a new technology. It seams that the ease of use of ROR is attractive to the less knowing and that the features and structure of Python or Java is more suited to those who have a grasp.

  • William

    First of all Steve made a good point about the wording. I work for a hosting company targeted specifically for Rails ( and we see a pretty even split between .NET/Java/and PHP developers coming our way. We have free plans that draw a lot of beginners and we collected background data on about 500 clients when we started. Interestingly, very few told us about a Perl background and most of the folks that stuck with us (and Rails as far as we can tell) were .NET or Java developers.

  • Lawrence Krubner

    Tate’s most recent book, From Java To Ruby, is relevant here. Java is becoming the legacy language, Java apps are becoming the legacy apps. While that means some people are willing to look for new solutions, it also means, very much, that there is money to be made supporting the old systems. Tate also argued that the productivity of the average Java programmer is actually decreasing, due to the heavy weight of the Java frameworks, and so it is actually taking more programmers than before to keep old Java apps going.

    This can’t last. Five years from now Java will be in decline, and corporations will move on to something that increase programmer productivty.

    –Lawrence Krubner

  • mlemos

    I do not use Ruby nor have tried to use it. However I have seen live presentations of Ruby and ROR, and I learned some relevant details about Ruby limitations that I think it is important to know before anybody considers Ruby for busy sites.

    One thing that I was told is that Ruby is totally interpreted. This means that it is in the state of PHP 3 in 1999.

    When Zend engine 1 was introduced with PHP 4 in 2001, PHP became a compiled language. PHP code is compiled in Zend opcodes (similar to Java bytecodes). This means that PHP code interpretation does not slow down PHP code execution.

    Using a Open Source or commercial caching extension like Turck, APC Zend accelerator, PHP scripts not only become much faster to execute, but they only take less memory.

    In sum, since PHP 4, PHP scripts can handle much more simultaneous users per server and return scripts response faster.

    There are many other details that make clear how much mature PHP is over Ruby and other languages. PHP is not perfect, but I think the detail above is enough to get you started about the reality of what language is more more mature for serious Web site development.

  • joe simms

    i was thinkning of switching to rail’s to until i found the symfony framework. soon to be releasing a stable 1.0 and a book, and IMHO it’s rails closest couterpart in php, and has some really cool features. check it out

  • I would think that PHP developers are more interested in seeing what all the hype is about rather than ditching PHP for RoR. If RoR turns out to be all the hype says it is, I’m sure people will move over permanently. In the meantime, it only make sense that you understand the “competition”. The more exposure you have, the more versatile you are in the industry. Considering the number of PHP developers that frequent Sitepoint, its no wonder the stats are slanted towards PHP developers. The results aren’t really a true representation of the web development community as a whole. Just the community that hangs around Sitepoint.

    Was the intent really to publish truely unbiased results, or make more money off another publication?

  • @steve_: The graph does not show the number of developers. It shows the likelihood that a developer who indicated he or she was planning to start using Rails uses a particular platform. This likelihood was calculated using the chi-squared test for determining the statistical significance of two sets of data; read more in the article.

    @chrisb: If you think there are errors in the graph, please share. Unless you were being genuine and referring to the choice of font, which I’m guessing not.

    @Confused: The intent was to show some examples of unstructured coding that rely on global variables, not an incompatibility with MVC.

  • @matt: I am insulted by the fact you state that the majority PHP developers cannot learn Rails. So now I ask, why would I even want to buy SP’s Rails book if a SP staff member is telling me because I use PHP there is no point in trying Rails.

    Rails can be used to hack together small apps even easier than PHP. So, I do not see your point here either. Perhaps you could elaborate this as well.

    I do realise that you may not have meant exactly what I interpret, but it is the connotation of it.

  • Goodness. Where did I suggest that the majority of PHP developers cannot learn Rails? I said that for some PHP developers, moving to Rails would be a natural fit because they will be disciplined and already using MVC. And for others — and there are a lot of beginners who choose PHP as their first language — it would be a headspin.

  • hehe, the error in the graph, is that it shows how likely RoR developers are to start using RoR.

    btw, i think something that can be taken out of the graph, is that PHP developers are willing to have a look at what else is available, and want to learn more.

    my 2c

  • If that number had been 0.0, then I would have excluded it from the graph, but as it is non-zero, I decided to leave it in. It indicates that some people answered “Ruby on Rails” as their answer to the question “What server platform(s) are you not developing for, but expect to in the next 12 months?”, but then later on went on to say that they were actually using Rails, after all.

  • Ed Schechter

    There is lots of overlap between the problem domains PHP and Rails are used for — small to medium websites.

    Although PHP can provably do ‘Enterprise’ sites, I suspect thats not what most PHP programmers work on. Many work in small to medium sites — where Ruby is a viable alternative.

    For a large corporation, with large investments in a legacy database and legacy systems, the candidates for rewrites are the Java world and the .NET world, with PHP as a possible situational tool. Rails is too new, integrates too poorly with existing legacy database systems at a driver level(AS/400, Mainframe), relies too strongly (in the context of evolutionary rewrites) on database design conventions and lacks decimal numbers (correct me if I’m wrong).

    It also — again, correct me if I’m wrong — does not have paid support options with binding service level agreements. For an IT manager, trying to tell the CEO why he can’t get any help from his vendors when a software problem brings the company to a halt, this is a showstopper.

    These — from what I see at work — eliminate Rails as an option for many .NET and Java programmers — skewing their conversion numbers down.

    None of these are criticisms of Rails in general — stikes me as a hell of a tool. Just one size does not fit all.

    Also, PHP developers, I suspect, often have more latitude to choose their tools. Corporate Java and .NET programmers are working in departments that chose these to begin with, and are generally more averse to trying anything remotely cutting edge.

  • Pitty the survey didn’t ask which group of developers were the most sensitive about perceived critisisms of their skills and experience :)

  • YouGuy

    I like the simplicity of Ruby on Rails, BUT of course, with any new programming language, I have the security worries ( Dang Hackers ).

    I kinda treat new programming languages like new cars, let it hit the market, and give it a year so all the bugs and worries can hopefully be fixed, then give it a try.

  • @matt:

    So here’s the question: do PHP coders know what they’re getting in for? Not to suggest that all PHP developers are burrowing away in an unstructured manner (we all know there are plenty of PHP frameworks these days that provide MVC separation and other similar benefits to Rails), but I wonder how many PHP developers are actually using them. Looking at some of the code out there, my guess is less than half.

  • Someone

    I will just point out one thing – we’re all in web development business which means we develop sites (so much for the obvious). If a person can switch back and forth between languages, that just means he/she don’t have a lot of work undergoing. Spending one or two days to see what’s all the hype about RoR can cost you a client because you didn’t deliver the product on time.

    I didn’t take part on filling in the survey, but was there a question about the age of people who took part on it? Their education and are they doing development fulltime or are just in the learning process?

  • @Someone, if you cant afford to spend one or two days on some R&D, you need to seriously reevaluate your business model before you fall behind the technology curve. Educating yourself is critical to web development.

  • Someone

    @mrsmiley – please, specify at least one reason why I should, for example, learn Ruby and adopt RoR if I have advanced PHP knowledge and can do anything my clients need with the use of PHP? I allready use a scalable MVC framework that I’m familliar with, my development cycle is fast and I see no point to spend 2 days learning something that suddenly became a boom. I have a lot of work to do, 2 days spent playing with something = lost money.

    And I doubt that I can create a webshop by clients’ strict orders in 10 minutes if I use RoR.


    Hi Matt,
    Interesting article. You are basically seperating PHP developers into two camps: those that make small scripts (contact forms etc.) and those that make bigger applications (with MVC, frameworks etc) which I think is a fair distinction. The point is though, if you are in the ‘small scripts’ camp, you really do not need to learn ruby. You dont even need MVC or frameworks within PHP. PHP is (in my opinion) the perfect language for small scripts without MVC. If you need to build a blog in 15 minutes then frameworks and MVC in SOME langauge is going to be the way to go. Not only will programmers without MVC experience find ruby hard going, they will find it overkill for what they are doing. Its that old cliche that gets brought into any “language Vs language” debate – use the right tools for the job.

    As an aside, I have looked into Ruby and like it a lot, however the difference between Ruby and a good PHP framework like Code Igniter is not so great for me to switch.

    @ed – well said
    @lawrence – recent trends are showing that Java is increasing in popularity as well as PHP, while .NET is going down.
    @charmedlover – matt was just making the point that learning ruby requires a working knowledge of MVC. Anyone trying to learn ruby without understanding MVC will be very very frustrated.

  • Ryno

    I must be a gumby for asking this as I’m sure it must have come up before but did any of the peole who said Python mention Django?

  • @Ryno: The question was a simple “tick the box” multiple choice, so unfortunately we don’t have any further details on that.

  • @Someone: The point isn’t so much that you should learn a new technology to replace what you already know, but to get a broader understanding of what is out there. If for some reason you come across a client that requires say PHP/Ruby integegration, you’d be one step ahead of the pack. Same deal as when you invested the time in learning PHP. R&D should be viewed as an investment, not as a business expense.

    If you are indeed as busy as you say, then why not hire someone else to do the work for you so your operation scales better. If you cant afford to take 2 days to preview something new due to lost money, that implies you cant take 2 days for a holiday or sick leave either. Neither of which, same as R&D, contributes directly to your profits, but indirectly, they all have an effect hopefully for the positive.

  • Someone

    mrsmiley, Ruby probably also has database querying mechanism and recieves user input (_POST, _GET) and then you write scripts that process that input etc.
    The same thing PHP / Perl / Python do.

    My clients don’t ask me to create websites in specific languages. Did you ever have a client?

    Broader understanding sounds ridiculous. I allready have one tool which helps me do anything. Why would i spend time learning how to anything with another tool?

    Regarding hiring someone else etc. – that’s not the issue here. We were talking about a tool made for developing websites. I said that I’m pretty satisfied with the one I’ve been using for years and that I see no reason why I should spend a few days learning something else which can only harm me at this point.

  • Dr Livingston

    bollocks… there is no way in this earth i’ll give up php, for the likes of ruby.

    god, i’d rather switch to python first :p

  • CityGoal

    Ruby on Rails is really cool. There are limitless possiblites with it.

  • ajessup

    The problem here is the article is comparing Rails (a framework) to PHP (a language). It’s an apples-to-oranges comparison.

    But what’s interesting the evidence that when PHP developers are looking for a Rails-like framework the they jump straight to Rails itself (and thereby having to install, learn and support Ruby as well as the framework) without considering many of the PHP frameworks like Cake or Symfony which seem to be largely analagous to Rails in terms of features but don’t need you to learn another language or technology stack.

    What would be really interesting is to see a true apples-to-apples comparison of which Cake/Django/Symfony/Struts/Tapestry/Rails/Mason etc. developers are thinking about switching to another framework, and why.

    And it would be really good to hear form anyone who’s had a real shot at more than one of these frameworks and which one they would choose in hindsight.

  • mpdesigns

    Coldfusion kicks ass if you can afford it. And please don’t use Myspace as Coldfusion’s gleeming example of a web app using coldfusion.

  • dev

    well my dear friends although I’m using ruby on rails you can create exactly the same with PHP and in my experience quicker, take a look of xajax and in addition exist rumors to implement a prototype-xajax hybrid.
    And to be honest I’d rather much more this combination :
    (Scriptaculos FX only, because the drag performance is poor)
    I’m using these for another project instead ruby and I’m very happy!
    and…. sorry other point that really I found terrible is the actual ruby server support is almost impossible find a server for a small client!

  • Yannick


    I don’t know if that’s what chrisb was about, but the scale numbering is wrong on your graph. It did give me a bad impression, as it’s the only thing you look at when you open the page. So let’s see… 1, 1.5, 2, 2.5, 2, 2.5 :-)

  • Ack. Of all the graphs in the report to publish online, I choose one with a typo.

    Thanks for pointing it out Yannick, fixed now.

  • Anonymous

    the survey shows more php devs are looking to move to RoR because there were more php developers who participated in the survey.. everyones using php these days.. ;)

  • prim8

    I think you will find a lot of folks in both camps (newbs and experienced devs). For example, if you are already test infected, which would you rather write?

    or this:

    At our local Ruby Users Group we have had 2 PHP folks show up wondering what the fuss was about and nobody from other languages (yet).

Get the latest in Front-end, once a week, for free.