Client's Speak |  FAQ
Call us: 248.681.1283
Follow Us:

Articles

ASP & ASP.NET Comparison

Posted On: Jul 09, 2014

ASP.NET has better language support with Common Language Runtime (CLR), a large set of new controls and XML based components, improved security and user authentication.

ASP.NET provides increased performance by running compiled code and early-bound calling of methods. Be aware that ASP.NET code is NOT fully backward compatible with ASP. The many inherent problems of ASP are being eliminated as the ASP.NET was built from the ground up.

New in ASP.NET

It would be easy to assume that you need Visual Studio.Net to create ASP.NET pages and to use the latest languages that comes with .NET framework but, that isn't the case. Support for the language is built into the common Language Runtime (CLR) and the compilers are provided as part of the freely downloadable SDK. This means that to write an ASP.Net pages all you need is a freely available SDK and your favorite editor, which could just be a Notepad. The new features in ASP.Net:

  • WYSWYG (What You See What You Get) editor 
  • Programmable controls
  • Field validation controls 
  • Event-driven programming
  • XML-based components
  • User authentication, with accounts and roles
  • Higher scalability
  • Increased performance - Compiled code
  • Easier configuration and deployment  

The inherent problems of ASP

Active Script Pages (ASP) was built using the Active Scripting technology, a technology originally designed to enable the developers write server side scripting and to control the applications in a uniform way. It isn't a technology that was really designed to develop a full-scale applications, which is essentially what many developers are trying to do using ASP. Now, the ASP.NET that was built from ground up is not written using Active Scripting. ASP.NET was built using C# (C sharp) and targeted as part of the .NET framework. ASP.NET was built to eliminate many inherent problems of traditional ASP, such as

  • Interpreted code, not compiler based 
  • being able to support only late-bound calling 
  • Individual memory consumption behavior of each instance of an active scripting engine.
  • Need for relatively expensive COM objects that are aimed to get around the low performance of late-bound code.
  • Having weak type system with just variants

Languages

The .NET Framework is made to support mainly three languages: 

-  Full Visual Basic, not VBScript.

-  C# (C sharp).

-  J-Script. 

but the whole infrastructure is designed to be language independent. The factored, open design of ASP.NET allows plugging HTTP modules, also extends to the CLR, allowing to plug other languages. Microsoft Automation done using VBA code can be supported in ASP.NET environment with minor modifications.

Better ASP.NET Controls

ASP.NET contains a large set of HTML controls. Almost all HTML elements on a page can be defined as ASP.NET control objects that can be controlled by scripts. ASP.NET also contains a new set of object oriented input controls, like programmable list boxes and validation controls. A new data grid control supports sorting, data paging, and everything you expect from a dataset control.

Web Form Controls

In addition to creating HTML elements using the HTML server controls, one can also use a set of controls that are part of ASP.NET. These controls are called Web Form Controls (Or just Web Controls). You might start questioning as to why a new set of server controls? And isn't it duplicate of the existing HTML server controls? 

 

In fact, the below are couple of good reasons in making this new set of Web Controls.

  • To make it easier for manufacturers and developers while building tools are applications that automatically generate the UI
  • To simply the process of creating interactive Web Forms requiring less knowledge of the why that HTML controls work and making the task of using them less error-prone.

Event Driven Programming 

The Web Controls described above allows event driven programming. All ASP.NET objects on a Web page can expose events that can be processed by ASP.NET code. Load, Click and Change events handled by code makes coding much simpler and much better organized. 

ASP.NET Components

ASP.NET components are heavily based on XML. Like the new AD Rotator, that uses XML to store advertisement information and configuration.

User Authentication and Easy Validation control

ASP.NET supports forms-based user authentication, including cookie management and automatic redirecting of unauthorized logins. (You can still do your custom login page and custom user checking).

Greater Scalability

Much has been done with ASP.NET to provide greater scalability. Server to server communication has been greatly enhanced, making it possible to scale an application over several servers. One example of this is the ability to run XML parsers, XSL transformations and even resource hungry session objects on other servers.

Increased Performance with Compiled Code

The first request for an ASP.NET page on the server will compile the ASP.NET code. Ability of Keeping a cached copy in memory, greatly increased the performance of the application.

Easy Configuration Changes

Configuration of ASP.NET is done with plain text files called web.config. This configuration file located on server changed while application is running. This eliminates the need for restarting the server on any configuration adjustments.

Deployment

No more server restart to deploy application adjustments via compiled code. ASP.NET simply redirects all new requests to the new code immediately as they installed on server.

Easy Configuration Adjustments 

Remember, ASP.NET is not fully compatible with earlier versions of ASP, so most of the old ASP should be changed to run under ASP.NET environment. To overcome this confusion, a new file extension ".aspx" is introduced with ASP.NET. This will make ASP.NET applications to be able to run side by side with standard ASP applications on the same server.