Monday, December 25, 2006

PHP vs ASP

Speed
PHP is faster and more stable than ASP. ASP is built on a COM-based architecture so when ever a programme tries to connect to a database or file he calls a COM object. When that COM object tries to access the file system it calls up yet another COM object. All these COM overheads add up and slows things down.

In PHP modules, everything runs in PHP's memory space. This means that PHP code will run faster because there is no overhead of communicating with different COM objects in different processes. In this case too, ASP is slower and more memory intensive than PHP's model because each ASP language compiler runs in its own process.

Price
PHP installations are far cheaper to install than ASP installations. PHP runs great on Linux which is free, on the other hand ASP runs on the IIS Server (Internet Information Server) which need's Windows N.T/2000/XP, any of which costs a lot, especially when compared to the price of PHP, nothing.

Apart from that ASP mostly uses MS-SQL Server as the back end which again is expensive, Where as PHP programmes mostly use MySQL which is FREE!


Extras

With ASP, if you need to upload files, then you need a third party component ASPuplod, if you want to send mail or encrypt passwords you need another component and so on. Each of these components has to be bought.

In PHP, if you want to FTP, encrypt passwords in MD5, or send email from a web page, you do not need any extra components as they are all built-in, which is, incidentally, another speed increase. Because everything is built-in, there is no extra layer of COM objects and access to email, for example, is faster than in ASP. Since PHP is Open-Source there are lots of plug-ins and lots of sample code.

Platform Support
PHP runs on Mac OS X, Windows, Win NT, Linux, Solaris, Unix, BSD etc.
ASP runs on Windows, under MicrosoftÕs IIS server, but there are a couple of projects that allow ASP to run on other platforms and servers but guess what, most of them cost money.

No comments: