Migration From ASP to ASP.NET
Migration to ASP.NET
The information provided on the document is not mine. I collected these information from various sources see bibliography below.I thought this might be useful for some one who wants to know why they should move to ASP.NET.
Why migrate to ASP.NET?
The Compiled execution makes the ASP.NET much faster than ASP. ASP.NET Will automatically detects any changes, dynamically compile the files if needed and stores the compiled results to reuse for subsequent requests. Microsoft tests have shown that Asp.NET application can handle two to three times the requests per second as classic ASP applications.
When output caching is enabled on a page, ASP.NET executes the page just once, and saves the result in memory in addition to sending it to the user. When another user requests the same page, ASP.NET serves the cached result from memory without re-executing the page. Output caching is configurable, and can be used to cache individual regions or an entire page. Output caching can dramatically improve the performance of data-driven pages by eliminating the need to query the database on every request.
ASP.NET session state lets to share session data user-specific state values across all machines in the Web farm. Now a user can hit different servers in the web farm over multiple requests and still have full access to her session.
Processes are closely monitored and managed by the ASP.NET run time, so that if one misbehaves (due to Memory leaks, Deadlocks), a new process can be created in its place, which helps keep your application constantly available to handle requests
The XML configuration file within the ASP.NET applications lets us to avoid registering the components using regsvr32. XCopy deployment is very handy.
The code behind feature cleanly divides an ASP.NET page into two files. One file contains the HTML content, and the second file, called the code behind file, contains all the application logic, we can inherit the code behid file to other files and reuse many functionality. Basically we can build library.
ASP.NET pages work in all browsers -- including Netscape, Opera, AOL, and Internet Explorer.
Migration Strategy:
· Both ASP and ASP.NET applications can run side by side on a server without adversely affecting each other. The two systems have totally separate processing engines. It is possible to have part of one application running ASP and another part of the same application running ASP.NET.
· Changing an ASP page's file extension from .asp to .aspx and correcting for some syntactical changes is usually enough to get an ASP page working as an ASP.NET page. Such a port, although it can be completed quickly, does not take advantage of many of the new features of .NET.
Horizontal and Vertical Migration:
· Horizontal migration involves replacing a whole tier of your application. For example, you may choose to initially replace the ASP code within your Web-based presentation tier, or you may replace the COM code within your middle tier as the initial migration step.
· Vertical migration involves isolating and replacing a piece of your application through all n tiers.
Compatibility:
ASP.NET is a complete overhaul of ASP. ASP.NET - 100 percent backwards compatible with ASP, The some of the changes made can be categorized into the following sections:
· Core API changes - (Request, Response, Server…)
Most of these API properties are changed to NameValueCollection
· Structural changes
In ASP, you can declare subroutines and global variables in between your code delimiters. In ASP.NET, this is no
longer allowed. You must instead declare all of your functions and variables inside a <script> block. In ASP.NET,
we can use any Common Language Runtime-compliant language. C#, VB.NET, and JScript are the current languages
provided by Microsoft. (VB script in now merged with VB.NET) which enable us to use structured exception
handing using the Try, Catch, and Finally keywords
· COM-related changes
Threading Model Changes, ASP.NET the threading Model is MTA.
ASP.NET supports early and late binding.
· Application configuration changes
In ASP, all Web application configuration information is stored in the system registry and the IIS Metabase. This
makes it quite difficult to view or modify settings because often the correct administration tools are not even installed
on your server. ASP.NET introduces a whole new configuration model based on simple, human readable XML files.
Each ASP.NET application has its own Web.Config file that lives in its main application directory. It is here that you
control the custom configuration, behavior, and security of your Web application.
· State management issues
In ASP.NET, you have additional options for your state storage model that will finally allow you to go beyond a single
Web server and support state management across a Web farm.
· Security-related changes
ASP.NET security is primarily driven from settings in the security sections of your web.config file
· Data access
ADO.NET
Development time advantage:
· Visual Studio designer support, rich server controls, and base class library support
· Write code in the language of your choice
· Call Microsoft Win32® APIs directly
· Structured error handling
· Great debugging and tracing support
· ASP.NET will automatically detect the change in the new component and start using the new code without the need of restarting the web server.
- ASP.NET pages are event based.
Event Flow in ASPX pages
· Page_init: pages and controls are initialized
· Page_load: all the controls in the page are loaded
· Change events for control are processed
· Click events for the control are processed
· Page_PreRender: page is about to render
· Page_UnLoad: page is unloaded from memory
Bibliography:
|
|
© Copyright
2003
BadreNarayanan.V.
Last update:
9/28/2003; 12:17:40 PM. |
|