Chapter 6: ASP.NET Architecture


Overview

ASP.NET is not just an upgrade to classic ASP but is completely rebuilt from top to bottom. Yet, many familiar ASP features remain, such as Request and Response objects, Application, and Server. You can use the ubiquitous <script runat = “server”> block or ASP <% %> script delimiters, among other familiar items. Microsoft designed ASP.NET so developers who are accustomed to creating applications with classic ASP can continue to do their work while becoming familiar with ASP.NET. Although you may have much time invested in writing legacy ASP applications, ASP.NET applications can run side by side with classic ASP. This is possible because .NET assemblies are not registered in the system registry. Moreover, if you do need to interact with a COM object from ASP.NET, the CLR allows you to do so by generating a runtime callable wrapper (RCW). The RCW functions as a proxy for unmanaged code.

You can also call an ASP.NET object from COM. Again, the runtime generates a COM callable wrapper (CCW). This is good news for developers. You need not abandon your legacy code and applications. Interoperability in the .NET environment between COM objects and managed code is provided by the CLR.

The ASP.NET Framework serves as the foundation for creating both web services and browser-based applications and, as mentioned in Chapter 5, has two separate parts, the Common Language Runtime (CLR), which provides support for .NET-hosted applications, and class libraries, which play host to three distinct components:

  • ASP.NET implements the Internet segment of the Framework.

  • ADO.NET provides access to SQL Server 2000.

  • Web forms lend support for smart-client user interfaces.

ASP.NET’s features for enhancing web page development, combined with the .NET Framework’s support for web services, make it the perfect tool for building web services:

  • The code-behind model separates HTML (the presentation layer) from program logic (server-side code). This eliminates the dangerous practice of writing spaghetti code that is prone to error.

  • An event-driven program model allows you to write your events and create handlers for them.

  • Server controls automatically render HTML appropriate for any client browser.

  • Server controls manage client state by using ViewState.

  • Code is compiled, thereby enhancing performance.

  • Application logic can be written in any CLS-compliant programming language, such as Visual Basic .NET, Managed C++ .NET, or C# .NET.

  • Web form development is simplified by using Visual Studio .NET as a RAD tool.

Let’s look under the hood and see how you benefit by migrating from classic ASP to ASP.NET.




.NET & J2EE Interoperability
Microsoft .NET and J2EE Interoperability Toolkit (Pro-Developer)
ISBN: 0735619220
EAN: 2147483647
Year: 2004
Pages: 101
Authors: Simon Guest

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net