by Cole O’C
ASP.NET and PHP are both very powerful, widely used tools for developing dynamic web pages. It can be incredibly difficult to choose between which one to use, or if to use both via Microsoft IIS, and can change on a per-project basis. In terms of performance, ASP.NET is generally considered faster due to being compiled language as opposed to PHP’s interpreted language. That said, the most important factor of quality performance is good design and implementation. The security of the program hinges strongly on the expertise of programmers rather than the languages themselves. As for cost, it is rather hard to beat PHP’s amazingly affordable price of free. However, some commercial controls and/or libraries can be purchased for PHP, which should be taken into consideration. Hosting services are also usually cheaper for PHP due to there being more hosting providers. However, the cost of ASP.NET may be justified because you can use it in conjunction with other Microsoft products such as Visual Studio and SQL Server. In terms of ease of development, ASP.NET has a higher level of abstraction and is more object-oriented than PHP, which means that ASP.NET is more likely to produce reusable code. For further information, there are two articles at the bottom that can help a developer choose which is best for them: the article from NetroStar is concise and is what I summarized here, while the article from PerfectWebTutorials is quite verbose and comprehensive.
I felt that both of the articles gave out enough information to make the topic a grey area, rather than a black and white “this one is best” idea. I can see other reasons for this than the ones they listed. For one, the only language a programmer needs to know in order to program in PHP is PHP. For ASP.NET, a programmer may use C#, VB.NET, and Jscript, among others. It seems as though it would be easier to become an expert when you can focus your expertise into one language. I suppose that ease is not always the name of the game, given that many major websites run off of several types of programing languages.
I did not know that PHP was interpreted code before this; I have only ever worked with compiled code before. I found it very interesting that PHP saves and runs directly from the code you wrote, rather than being compiled into machine language. Having the code compiled once and then running off the machine language could have a huge impact if your website has a lot of traffic. Having the site interpret the PHP every time could become very time-consuming, but might not be a hassle if the site is small.
Matuszewski, Pawel. (2011, Jul 20). NetroStar. Retrieved from http://www.netrostar.com/ASPVSPHP. 2012, Feb 19.
Perfect Web Tutorials. (2012, Jan 3). PerfectWebTutorials. Retrieved from http://perfectwebtutorials.com/2012/asp-net-vs-php-complete-comparisons/. 2012, Feb 19.