Survey after survey continues to show the popularity of PHP over any other web based language for creating anything from the simplest single home page to complex ecommerce and enterprise solutions. Recent Netcraft surveys show PHP installations on more than twenty million (20,000,000) domains. This is by in front of the second place getter which is PERL.
So, what is it about PHP that makes it so popular and why is .NET (and other Microsoft languages), dragging the chain in server side languages. The .NET platform has many benefits, not the least of these is its speed, but webmasters the world over continue to push the PHP language to new hights of popularity.
PHP puts the "P" into what has now become popularly known as the LAMP Stack (Linux Apache MySQL PHP). With the Apache web server installed on more than half of the worlds web sites, there is really no rival for it. The Apache web server is freely downloadable, like all parts of the LAMP stack with PHP among them. PHP is easily compiled as an apache module and makes a sturdy compliment to it.
In comparison, Windows Vista comes with IIS installed freely for a single web site. Of course, you need to purchase a license for Vista before you can begin. A single server installation is rarely suitable for companies that have more than a single domain. At a minimum, most will favour registering several domains with different TLD's. This leads to requirement to puchase Windows Server, the price of which begins at approximagely USD$600.00.
Of course, the most common tasks asked of web languages these days involves database communications. Microsoft provide a limitted "express" version of their MS SQL Server for free, but most installation will require the full version which add further to the total cost of ownership.
Once again, open source projects bring a bevy of alternatives which are freely downloadable and not limitted. Among these the most popular is SUN Microsystems` MySQL database. MySQL has the benifit of being a truly cross platform application, with source code freely available and binary releases for Linux, OSX and Windows platforms, it is clearly a superior choice for many when selecting a platform to run their business or enterprise.
With the above information in mind, it is not too difficult to see that the choice of server side scripting is often not one of preference or suitablity, but one of finacial logistics. The total cost of ownership of running .NET on Windows, rather than PHP on the LAMP stack is considerable.
The most common problem encountered with .NET development is portability. The .NET model supports only Windows servers, thus making cross platform integration impossible. Should a better hosting opportunity arise on another platform, or you are forced to move to another, non-windows, platform, .NET will not function and the site owner is left with a choice of finding another Windows server, or re-write their site/application to support more open standards.
PHP on the other hand permits the site or application owner to move their code base between platforms with ease. The genuine cross platform compatibility of PHP allows developers the freedom to write code that can be run on any server supporting PHP, thus avoiding the technological lock-in incumbent of Windows and .NET. Using the same code base, PHP can be compiled and built on about 25 platforms, including most UNIXs, Windows(95/98/NT/2000) and Macs. PHP currently will load into Apache, IIS, AOLServer, Roxen and THTTPD and many other web servers. Alternatively, it can be run as a CGI module.
The technology lock-in that comes with .NET also brings with it increased cost of ownership, as previously outlined. This, in part, is due to the closed source nature of Windows and the .NET system, combined also with increased maintenance when compared to open source alternatives. PHP has been constantly the most the most popular apache scripting language according to SecuritySpace's Web Survey. This sort of popularity brings with it many more coders, thus reducing development costs at the outset as well as ongoing maintenance costs when additions are required.
Programming is programming, and many facets of programming transfer themselves across languages regardless of platform. System design and security issues have some universal traditions and taboos. Any sensible system design will make use of as many pre-existing components as possible, thus reducing development costs and development time. Invariably with .NET this means even more expenditure with the cost of each component being set by individual developers or by companies whose sole concern is to profit from .NET component development.
In stark contrast to this model, the PHP community and developers have vast repositories of classes and components freely available that cover many of the needs of most web applications.
From a security perspective, PHP is much more secure than the .NET platform when considering bugs versus fixes within the core code itself. This alone has seen sites such as facebook.com, yahoo.com, big-boards.com, gaiaonline.com, and digg.com, who all choose PHP as the preferred platform to base their enterprise on. Couple this with PHP's flexibility and speed-to-market and you can see why PHP is the choice of the web.
With the sort of market penetration that PHP has gained it is assured that it will be a strong contender for many years to come, whilst the Microsoft camp gets set to introduce yet another language to try to make up lost ground.
Labels: .net, developers, face book, LAMP, linux, Netcraft survey, penetration, PHP, PHP community, PHP v NET, survey, windows