Monday 15 February 2010

PHP vs .NET? Irrelevant question?

A new client, the same question - "which is better - PHP or .NET for my new website?". This is perhaps the most regularly asked question we are faced with in our first client meetings and I am not sure we have identified the most suitable response - at least not yet.

We are primarily .NET (C#) and SQL Server developers but only because our proprietary content and e-commerce management system (Cloudbase™) is built on this foundation. We believe we have an incredibly powerful solution in Cloudbase™ and that every website inquiry we receive can benefit from the product, but we do have some experience of PHP and MySql and big companies like Facebook use those technologies almost exclusively. So what should your website be built on?

Framework vs. Scripting Language

To start with, I should probably qualify the comparison I am drawing here by saying that we aren't exactly comparing apples with apples. Microsoft's .NET is a framework while PHP is a scripting language. The difference is quite important because we should really be comparing PHP to one of the languages (such as C# or Visual Basic) that run on the .NET framework. To avoid getting too technical however, I am going to be referring to .NET throughout this blog post as all or any of the languages that run on the framework and comparing these to PHP.

Key Differences

I initially started writing this blog post by defining PHP and .NET as well as all the major players involved with both technologies, but having just re-read it I have decided to cut all of that and state the key differences I see one facing when choosing one or the other. Much of these differences comes down to toolsets and pricing:

  1. PHP is free whereas Visual Studio is not. Does this matter to you? No. The company you choose to do your website design and development will pick up the tab for the licensing of Visual Studio if you choose .NET so it makes no difference to you whatsoever.
  2. MySql is free and the full version of SQL Server is not. These are database engines and both play important roles in dynamic websites built for the two languages. If you have a small (even medium-sized website) then SQL Express will suffice, and this technology IS free. Admittedly, the full version of SQL Server is pretty pricey but for the majority of websites out there, this question is mutable too.
  3. PHP runs best on Linux servers and .NET will only run on Windows servers. Linux servers are significantly cheaper than Windows servers due to licensing. All true. The average difference we have seen between the two hosting options is around 10%. i.e. Windows servers cost approximately 10% more than Linux servers on a leased, monthly basis which equates to approximately £10 per month for a business dedicated server. Does this matter to a website requiring dedicated server hosting - probably not.
  4. Support for PHP is poor and expensive. There are multiple, very large organisations driving PHP forward just as Microsoft does .NET but there are also a number of different PHP flavours and associated technologies available to choose from. The key question to assess the answer to here is whether your chosen development team is capable of delivering a quality, ongoing support service that matches your immediate and long term requirements.

So, a commonly assumed difference between the two choices is price, and Microsoft have gone to great lengths to compete with PHP and PHP-related technologies by releasing their Express versions of the .NET development environment and SQL database engine. In my opinion there isn't much in the race to be the dominant web scripting language, and for the foreseeable future, I expect both to be comparable, viable options for website development.

If I was choosing a company to do my web design and development, instead of determining which language they might build my site on, I would examine the following 5 aspects of the companies I am considering to build the site:

  1. What does the company's portfolio look like? Do their design skills meet the expectation I have for my website's own look and feel? Apple has in recent years demonstrated that design is important to most of us. The success of the iPod, iPhone and now the iMac is indicative of our desire for beautiful, not just functional technology. Can the company / designer deliver a quality design on a reasonable budget?
  2. What ongoing support does the company / developer offer it's clients? Many people choose to get freelance designers and / or developers to build their website. Unfortunately, these people tend to get bored quite quickly and move rapidly from one project to the next - seldom looking back and seldom supporting their ongoing client requirements. The 80/20 principle applies in web development too - 80% of the developer's time is spent finishing the final 20% of the site. A freelancer (in my experience) is less likely to invest this time in putting the important finishing touches on my website than a company geared to build a long term relationship with me. Although freelancers tend to be a significantly cheaper solution upfront, the question to ponder is: if I lose this developer, will someone else be able to pick up where they left off, and what might this cost me?
  3. Will they provide me with the tools necessary to manage my own website for most day-to-day requirements and allow my site to grow as my business does - without platform limitations? A commonly overlooked requirement for any website is it's content management system (CMS). Many developers (and the PHP community in general has a greater propensity for this in my experience) use open source CMS technologies. Some of these are better than others but in most cases the choice of CMS platform is never discussed with a client before the contract is signed. I would discuss this. It might make or break my website.
  4. Will my website's functionality and / or design be limited by the CMS? In most cases, and especially for open source CMS's the answer is yes. To me, this seems odd. It is like asking a painter to paint a portrait without providing him / her with sufficient paint or the colours he / she needs to finish the job. I would ensure that my website designer is unconstrained by the CMS my developer is going to implement.
  5. What are the Search Engine Optimization (SEO) credentials of the company building my website? Search engines are critical to the internet, and so building my website with an understanding of how search engines index the content on it and help visitors find me on the web is of paramount importance. CMS systems can make or break a search engine optimization strategy so I would ask my developer whether their CMS of choice will limit or enhance this in any way.

To finish off and summarise, I think the choice between PHP and .NET is irrelevant on every level. The important choice is who you get to do your design and development. I have listed the top 5 aspects of website design and development that I would nail down before commissioning anyone or any company to build my site and I hope you find them useful.

Please do share your own experience-led thoughts on this topic in the comments.

No comments:

Back to top