PHP Vs ASP: A Simple Comparison


"What's the difference between PHP and", "Why can not PHP Applications talk to applications?" Egypt "That could have been done in PHP so much quicker, and for free". These are some of the questions you will face when trying to decide on which web platform to use; or PHP. Both platforms have their pro's and equally, both have cons.

PHP is the "cheaper" of the two platforms. Infact, to get started in PHP is absolutely free to get started including operating system, web servers, and a development IDE. When you compare that to the starting cost of Visual Studio, IIS, Microsoft Server. It can all quickly add up. Microsoft has given out "express" versions of most of their software to get started, but you the costs will always come if you are working on an enterprise level.

While PHP IDE's are free, they often require lots of addons and plugins to get to the level that Visual Studio provides. Often these plugins will cost, (Albeit not as much as a full package of Visual Studio) which can quickly add up.

Depending on who you ask, PHP's poorly typed structure can either be a blessing or your worst nightmare. While the ability to convert between variable types without any special parsing makes coding easy to begin with. It often creates issues at runtime when a function can return both a boolean or an int. is mostly strongly typed, although in .net 3.5, the "var" keyword was introduced to allow for ambiguous variable types. The consistently typed nature gives it a much more structured approach, where you will always know what a variable will contain.

Out of the box, PHP does not come with any templating system. While you can simply "include" portions of your template, it is not as powerful as ASP's built in "MasterPages". You can use templating systems for PHP from third parties, but it is yet another "addon" that you will be required to get.

While both systems have the ability to use the MVC model, has an "official" addon which comes directly from Microsoft. PHP's most popular MVC implementation is CakePHP which is free to download.

There are many factors that may sway you each way. Many developers will simply choose whichever platform they were first exposed to (for better or worse). My advice is to simply choose PHP for more loosely put together web scripts, something that requires more flexibility and less overhead. Use (with MVC), to create stable enterprise applications.


Leave a Reply