ASP.NET vs PHP (yawn)…no wait, give me a chance to explain

A subject which I’ve been wrestling with for a while now is this whole ASP.Net vs PHP thing. I’ve been a .Net developer for years now and before that I worked primarily in ASP (vbscript). But recently I’ve grown more interested in experimenting with PHP. At a recent conference, a Microsoft representative asked me why so many startups were developing in PHP rather than .Net. My response centred around the fact that PHP developers are generally more engaged in the open-source approach to development that the speed with which solutions can be built by using third-party code makes it a great way to launch ideas without a huge investment in development time. As I think more about this here is a mostly non-technical comparison of the two platforms (from my own point of view).

ASP.Net PHP
Technical expertise required Requires a fairly high level of technical expertise to implement solutions Third-party modules allow relative novices to build advanced functionality
Code Manageability Strict coding conventions create more manageable code at the expense of time to implement Loose coding conventions allow faster development at the expense of manageability; stricter conventions can be used but must be self-imposed
Configuration and deployment Can be complicated, often requires technical expertise to set up hosting environment High availability of pre-configured platforms.
Web-2.0-ability Libraries for current web APIs are thin on the ground and often appear months after the API is launched Libraries for current web APIs are abundant and often appear soon after the API launch if not already provided by API vendor.
Conversion from prototypes Page control mechanism can make conversion from static HTML complicated, particularly when implementing client-side libraries and AJAX techniques. PHP code can be added directly to HTML source code, no additional page control code is automatically added.

I think that the main reason for PHP being so popular is that when used simply, it’s a development tool that can be used by creative people. The fact that so many excellent modules are freely available means that coming up with a good idea is the hardest part of the equation. ASP.Net is probably still a better choice if you want really good, manageable code but the time and expertise required to implement a solution is much greater.

A question that keeps crossing my mind when I’m looking at which platform to choose for projects is: “Do I want to create solid code or provide a timely solution?”. On the web, where nothing is permanent, it’s often better to launch something as soon as possible and then refine it over time than to spend far longer and hope that you get everything right first time – because that never happens.

4 Responses

  1. Steve Williams says:

    I totally agree with your line “it’s often better to launch something as soon as possible and then refine it over time.”

    Which is why I feel PHP is by far the best solution, you have displayed this with the re design of your site. A lesson for us all!

  2. Dave says:

    Thanks for the vote of confidence, I’ve not yet launched the new version of this site, merely tweaked some of the HTML a bit. However, I have recently been experimenting with Drupal for building a community site and the amount that we got done in the first day was amazing.

  3. Hartvig says:

    I think another very main concern is scaling costs. If you look at the number of servers that the *very* popular “web2.0″ (oh, how I dislike that word) sites has, licensing does become an issue.

    I think that ASP.NET is much faster to use than its rumor, but PHP is easier to learn and to “hack” which is another very important issue.

    Being able to get something done fast is often also a matter of a framework/tool on top of a framework – like building a community site with Drupal. That’s what Drupal is all about, so the main credit here should go to Drupal rather than php.

  4. Dave says:

    Your comments regarding Drupal are very true, however the fact that Drupal has so many free modules available for it is mainly down to php. There are similar frameworks available for ASP.Net e.g. DotNetNuke but they don’t seem to be able to match any php based solution for the speed with which the developer community starts rolling out plugins and extension modules.

Leave a Reply