What ASP.NET provides on top of that
Feb 25, 2009
One of the great advantages in .NET technology is the editor, Visual Studio .NET IDE. Usually, a good IDE can turn seasonal programmers into permanent ones, or make those who work part-time more productive. It's a like a constant teacher, nagging the developer about what goes wrong, highlighting syntax, completing the commands, and organizing the code better. It also has an efficient debugger, which means a lot when working with newly emerged developers, but also with experienced ones, because it takes a lot of the “mechanical” stuff off the programmer's shoulders. Faster coding translates, of course, into an increased productivity - and then, what any manager loves to see: better payoffs.
The .NET framework on which ASP.NET relies provides classes for markup abstraction, which translates into an easy generation of HTML code appropriate for the browser that is used for connecting to the web site. This means that developer can go on accessing the respective site through any type of browser, the standard HTML browsers as well as the mobile browsers (hosted e.g. on a PDA or a WAP phone) - without having to render the various markups that are needed, because the .NET framework deals with this by itself. Although the developers have to rely on Microsoft's choices in terms of handling browser compatibility, still .NET provides the same flexibility as PHP, i.e. the developer is free to write personal HTML libraries, while managing different stylesheet classes for different clients according to his own will. In the end, the ASP.NET native support for cross-browser compatibility is far more extended than the one provide by PHP.
The latest .NET versions bring added functionality to all .NET languages. .NET framework 3.0 includes a set of managed code components that are an integral part of Windows Vista and Windows Server 2008 operating systems. This release includes four major components, starting with the WPF, or Windows Presentation Foundation, which is a new user interface subsystem and API based on XML and vector graphics that uses 3D computer graphics hardware and Direct3D technologies. It also includes the WCF, or Windows Communication Foundation, a service-oriented messaging system which allows programs to inter-operate locally or remotely, similar to web services. The other two components are Windows Workflow Foundation, WF, and Windows CardSpace, which is a software component that stores a person's digital identities and provides a unified interface for selecting the identity for a particular transaction.
The last version released for the .NET technology, .NET 3.5, was in 2007, and includes added properties to the Base Class Library classes, as well as language improvements such as the Language Integrated Query, or LINQ. LINQ can define a set of query operators that can be used to query, project and filter data in arrays, enumerable classes, XML, relational database and third party data sources, allowing any data source to be queried.
In every argument between .NET and PHP things turned to code compiling. We all know that .NET compiles code, like C#, into a language dubbed Microsoft Intermediate Language (or MSIL in short), that runs on machines through a runtime environment, the .NET Common Language Runtime (CLR). It can be reasonably compared to Java's bytecode (the code resulting after the primary source code is compiled). PHP, on the other side, can not really offer a match for MSIL, since PHP is basically a script that is interpreted at runtime. For those who care about interpreting vs. compiling, there's not much to be said - interpreted languages are simply way slower than compiled ones.
But, both with PHP and ASP.NET, a web server can be configured to do connection pooling and caching pages hosted there, in order to avoid recompiling pages every time. In this way, one can not be strict in saying that PHP is exclusively interpreted, while ASP.NET is compiled. PHP tries to match ASP.NET by occasionally using pre-compiled code sequences, or various optimizers such as Zend, but let's face it, they don't always work as expected, and anyway they require some effort for finding and setting up (whereas in ASP.NET's case, it all comes with Visual Studio, no setup effort required).
The following sections include a factual comparison between PHP and ASP.NET technology functionalities. See what both development tools have to offer in terms of programming techniques.
Introduction - PHP and ASP.NET - Making the right choice
1. The new OOP additions in PHP 5
2. What ASP.NET provides on top of that
3. PHP features
4. ASP.NET features