Introducing ASP.NET
ASP.NET is Microsoft's answer to the aforementioned problems and many others that were not explicitly stated. It is a fundamental rewrite of ASP that has been in process for more than two years. The ASP team took a close look at the problems facing Web developers and created a brand new platform in the spirit of traditional ASP to solve those problems. Having used ASP.NET for a considerable amount of time, we can conclusively say they hit a home run with this release.
Platform Architecture
ASP.old was an Internet Server Application Programming Interface (ISAPI) filter that was written specifically to interact with Internet Information Server (IIS). It was monolithic in nature and relied very little on external services.NOTENote: In the IIS 5.0 time frame, ASP did use Microsoft Transaction Server (MTS) as an external service.ASP.NET is still an ISAPI filter. However, unlike ASP.old, ASP.NET relies on a large number of "external" servicesthe .NET framework. ASP.NET and the .NET framework are so tightly coupled that it is difficult to consider the .NET framework as an external service. However, since it is accessible from applications outside the scope of ASP.NET, it should be considered an "external" service. As it turns out, this is a huge win for the ASP.NET developer. No longer must the developer write everything from scratch. Instead, the .NET framework provides a large library of prewritten functionality.The .NET framework redistributable consists of three main parts: the Common Language Runtime, the .NET framework base classes, and ASP.NET.
Common Language Runtime
The Common Language Runtime (CLR) is the execution engine for .NET framework applications. However, despite the common misconception, it is not an interpreter. .NET applications are fully compiled applications that use the CLR to provide a number of services at execution. These services include:
Code management (loading and execution)
Application memory isolation
Verification of type safety
Conversion of IL to native code
Access to metadata
Garbage collection
Enforcement of code access security
Exception handling
Interoperability
Automation of object layout
Support for debugging and profiling
The CLR is a platform that abstracts functionality from the operating system. In this sense, code written to target the CLR is "platform independent" provided that there is an implementation of the CLR on the destination platform.
Managed Execution
The CLR isn't just a library or framework of functions that an executing program can call upon. It interacts with running code on a number of levels. The loader provided by the CLR performs validation, security checks, and a number of other tasks each time a piece of code is loaded. Memory allocation and access are also controlled by the CLR. When you hear about "Managed Execution," this is what folks are speaking about: the interaction between the CLR and the executing code to produce reliable applications.
Cross-Language Interoperability
One of the most frustrating things with current COM- or API-based development practices are that interfaces are usually written with a particular language consumer in mind. When writing a component to be consumed by a Visual Basic program, a developer will typically create the interfaces in a different fashion than if the component were intended to be consumed by a C++ program. This means that to reach both audiences, the developer must either use a least common denominator approach to developing the interface or must develop an interface for each consumer. This is clearly not the most productive way to write components. A second problem that most developers merely accept as normal today is that most components need to be written in a single language. If you create a component in C++ that exposes an employee object, you can't then inherit from that object in Visual Basic to create a Developer object. This means that typically a single language is chosen for most development projects to enable reuse..NET changes all this. Cross-language interoperability was built in from the start. All .NET languages must adhere to the Common Language Specification (CLS) that specifies the base level of functionality that each language must implement to play well with others. The CLS is written in such a way that each language can keep its unique flavor but still operate correctly with other languages within the CLR. The CLS includes a number of data types that all conforming languages must support. This restriction works to eliminate a common problem for developers: creating an interface that utilizes data types that another language doesn't support. It also supports both Binary as well as Source code inheritance, enabling the developer to create an Employee object in C# and inherit from it in Visual Basic.What this means to you as a developer is that code reuse has become much simpler. As long as the code was written for .NET, you don't need to worry what language it was written in. In fact, the choice of language becomes more of a lifestyle choice instead of a capability choice. All languages in .NET are theoretically created equal, so you gain no performance or functionality benefit by using Visual Basic instead of C#. Use the language in which you are the most productive.
New Features in ASP.NET
Up to this point all the features mentioned are gained due to the hosting of ASP.NET on top of the .NET framework. However, these features are just the tip of the iceberg. As I mentioned previously, ASP.NET is a total rewrite, with significant features aside from the intrinsic .NET ones. We are going to give you an overview of the new features in ASP.NET while showing how these features address the problems of separation of code and design, scripting languages, and state management.
Web Forms
Web forms are Microsoft's attempt Chapter 2, "Page Framework."
Web Services
As we move beyond the firstChapter 6, "Web Services," for more information.
Data Access
When ASP 1.0 first shipped, theChapter 11, "Creating Database Applications with ADO.NET."
Deployment
One of the perennial arguments Chapter 5, "Configuration and Deployment."
Configuration
In the past, all configuration Chapter 5.
State Management
State management has been vastlyChapter 4, "State Management and Caching."
Caching
The reason most developers useChapter 4.
Debugging
Debugging ASP applications hasChapter 3, "Debugging ASP.NET Applications."
Availability
Anybody that currently has a Chapter 5.