PHP and ASP.NET Side By Side
Since Microsoft released ASP.NET, there has been a widespread debate among developers about the merits of ASP.NET over PHP. One is Microsoft’s commercial web development technology and the other is an open source web development language which is best known when used with Linux, Apache and MySQL (together the combination of Linux, Apache, MySQL and PHP is often referred to as LAMP).
Both ASP.NET and PHP run on the web server (unlike something like JavaScript which runs in the client web browser). Web pages are dynamically generated as they are fetched from the web server and the language controls what and how the pages are displayed. Each language supports a variety of features including back-end database support, XML, mathematical functions, cryptography, text processing and web services.
PHP is open source and the majority of server type Linux distributions (and some desktop ones) offer Apache, MySQL and PHP as part of the normal installation.
ASP.NET is developed and marketed by Microsoft and therefore only runs on the Windows platform (unlike PHP which, besides Linux, runs on Windows, OS X, FreeBSD and others). ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. Note: There is also an open source implementation of .NET (including ASP.NET) called Mono.
To compete with the open source world, Microsoft give away the special ‘Express’ version of their software (including Visual Studio and SQL Server) which allows developers to start writing with ASP.NET without buying any additional software from Microsoft.
Looking at PHP and ASP.NET side by side there are a number of important differences to note. First PHP is C like in its structure and can be simpler for developers to learn, especially those familiar with the C language. ASP.NET is different in that web pages can be developed in any language supported by .NET. Traditionally this means Visual Basic or C#. Although PHP has some objected orientated (OO) functionality C# is a full OO language.
Another big difference between PHP and ASP.NET is that PHP is interpreted code while the programming language parts of ASP.NET (like VB and C#) are compiled. Technically, VB and C# are compiled to an intermediary language and then at run time it is compiled into native code. The upshot of this is that ASP.NET web services or applications should be faster.
Although not open source, Microsoft do offer the Visual Studio Express IDE for free. The Visual Studio IDE is a professional application and it is the IDE that the majority of Windows developers use even for desktop applications. It has syntax highlighting, command completion and built in project organization. It also includes a good debugger which is something that PHP sorely misses. To be fair to PHP, developers can get Zend Studio (from the makers of PHP) but it is not free.
Leave a Reply
Recent Comments
- Pavol on Windows 7 Install: ‘Cannot boot from CD – Code 5′ Problem and Solution
- silver on Windows 7 Install: ‘Cannot boot from CD – Code 5′ Problem and Solution
- mhon on Windows 7 Install: ‘Cannot boot from CD – Code 5′ Problem and Solution
- MMC on Windows 7 Install: ‘Cannot boot from CD – Code 5′ Problem and Solution
- Nestu on Windows 7 Install: ‘Cannot boot from CD – Code 5′ Problem and Solution


