With the release of the first version of the .NET Framework about a decade ago, a whole new direction in software engineering emerged. Inspired by the best features of Java, COM and web technologies and trained on the mistakes and limitations of previous technologies, developers at Microsoft decided to completely update their development platform.
This resulted in a number of amazingly advanced technologies for doing everything from building Windows applications to querying databases, and a specifically focused web development tool called ASP.NET.
Today ASP.NET enjoys unprecedented popularity, but is no longer a particularly revolutionary technology. And although the basic functionality underlying ASP.NET, surprisingly, looks exactly the same as ten years ago, the developers from Microsoft have added to them some more additional tools and abstractions of higher-level coding.
There is also at least one new direction, which is in competition with traditional ASP.NET programming, called ASP.NET MVC.
When ASP.NET was first released, there were seven key facts that set it apart from previous Microsoft products and competing platforms. For those who have switched to ASP.NET from some other web application development platform, or who have never yet programmed in .NET web applications, the material in the following sections will provide a quick overview of ASP.NET.
ASP.NET integrates with the .NET Framework
The .NET Framework is divided into an almost unrepeatable series of functional parts with tens of thousands of types (in .NET this is what classes, structures, interfaces, and other key programming elements are called). Before attempting to program any .NET application, you must first get at least a basic understanding of these parts and why they are organized in this way and not in any other way.
The way that the extensive collection of functionality offered in the .NET Framework is organized will undoubtedly seem like a remarkable improvement to programmers of traditional Windows applications. Each of the thousands of classes available in the .NET Framework is housed in a logical hierarchical container called a namespace.
Different namespaces provide different functionality, but together they offer functionality for virtually every aspect of distributed development, from message queuing to security. The whole of this vast set of tools is called a class library.
Interestingly, the way in which the .NET Framework classes can be used in ASP.NET is no different from the way they are used in any other type of .NET application (including standalone Windows applications, Windows services, command line utilities, etc.).
Although in .NET offers specifically for Windows- and Web-oriented classes to build user interfaces, most features of the .NET Framework (starting with accessing databases and uploading multi-threaded processing) is allowed to use in applications of any type. In other words, .NET offers the same tools to web application developers as it does to developers of feature-rich client applications.
ASP.NET code is compiled, not interpreted
Like all .NET applications, ASP.NET applications are always compiled. In fact, executing C# or Visual Basic code without precompilation is simply not possible.
ASP.NET applications actually go through two stages of compilation.
In the first stage, code written in C# is compiled into code in an intermediate language called MSIL (Microsoft Intermediate Language), or simply IL. This first step is precisely one of the main reasons why a wide variety of languages can be used in .NET.
The fact is that all .NET languages (including C#, Visual Basic and many others) are essentially compiled into virtually identical IL code. This first compilation step can either happen automatically when the page is first requested, or it can be done beforehand (this is called precompilation). The compiled IL code file is an assembly.
The second stage of compilation takes place just before the actual execution of the page. In this stage, the IL code is compiled into low-level machine language code. This stage is called Just-In-Time (JIT) compilation and looks the same for all .NET applications (including, for example, Windows applications).