ASP is a framework for web development and supports different models such as Classic ASP, ASP.NET Web Forms, ASP.NET MVC, ASP.NET Web Pages, ASP.NET API and ASP.NET Core.
ASP and ASP.NET are server-side technologies executing code on a web server.
Active Server Pages (ASP), developed by Microsoft, are the same as HTML pages that contain scripts and embedded media, and then processed on a web server, In the past (with Classic ASP), it was only deployed in a Microsoft environment.
Active Server Pages have the file extensions .asp (for Classic ASP) or .aspx (for ASP.NET)
When a web user initiates a request, by calling an ASP or ASP.NET page, the web server processes the Active Server Pages and the scripting engine generates the content displayed back (on-the-fly) to the web user. ASP works with any browser that supports HTML (as the output is HTML).
Active Server Pages present the front-end of web-based applications by running ActiveX scripts and components inserted into the web pages.
ActiveX is similar to Java Applets and uses object-oriented technologies for programmers to develop powerful and dynamic web applications more easily. These scripts and components are packaged as ActiveX controls that are reusable and can be shared by different programmers and programs.
ASP.NET was first released in 2002 in the .NET Framework 1.0, and superseded Classic ASP, which had released three versions between 1996 and 2000.
The last version of Classic ASP was released in November 2000 as ASP 3.0 for IIS 5.0 and is still officially supported by Microsoft until 2020.
It may be a Classic, but ASP is still a powerful approach to dynamic web pages.
Classic ASP
ASP was initially an add-on feature for Microsoft IIS (Internet Information Server), however, with the release of Windows Server 2000, it became a permanent and free component of IIS.
Microsoft Internet Information Services is Microsoft’s customizable and modular web server engine that supports the protocols HTTP, HTTPS, FTP, FTPS, SMTP, and NNTP.
Being Microsoft’s first server-side scripting language for dynamic web pages, Classic ASP (.asp) could only run on a Microsoft platform as two languages were used, VBScript and JScript. At the time, Microsoft did not provide native support for other programming languages.
VBScript was actually designed for Internet Explorer browsers and limited to functionality within its’ scripting abilities, and JScript was only supported on Internet Explorer and Netscape browsers.
.NET Framework
Microsoft’s .NET Framework[i] is an environment for developers to build dynamic web sites, web applications, and web services.
It is a software framework (environment) that provides a large class library (Framework Class Library – FCL) and supports several languages allowing the framework to process code written in other languages.
.NET programs are executed in a Common Language Runtime (CLR) environment, so in essence the FCL and CLR make up the .NET Framework.
.NET has released cumulative updates and subcomponents over the past 15 years, providing a stable and widely-implemented web platform that is no longer exclusive to a Microsoft environment.
Although ASP.NET releases are tightly-parallel with IIS releases, it can be developed on other frameworks like Spring.NET (framework for Java).
Migrating from ASP to ASPX
With .aspx replacing .asp, developers are encouraged to focus on designing applications with an event-driven GUI model, instead of web scripting using ASP (and PHP). PHP is still being actively developed unlike ASP, which is simply being replaced by ASP.NET.
There is an extensive list of enhancements that could motivate the decision to migrate, with very few reasons not to – let’s look at some of the motivators:
- With ASP.NET being compiled code, it runs faster with earlier error detection in the development stage. In addition, the error handling has improved significantly from ASP.
- NET can cache an entire web page (or only parts), which has a notable improvement on performance – where loading a page is much faster if the content is already sitting there, waiting to be called again.
- NET has Session States to save entered data, and in some cases it has become a necessity where an activity or task has to be tracked online (example, capturing a timesheet or shopping online), or even just for remembering login details.
- From ASP.NET 4.6, there is HTTP/2[ii] support on Windows 10. HTTP/2 is the revision of HTTP – the web protocol as we know it. Speed and performance are accredited to being the driving factors to switching over to HTTP/2.
- NET provides extensive controls and class libraries, and user-defined controls, which is laid out using the visual editors.
- NET handles memory leaks by unloading and reloading an application.
- Improvements were made from ASP.NET 2.0 to address standards compliance as the generated code displayed back to the web user did not consistently validate against W3C/ECMA standards.
ASP.NET on non-Microsoft Platforms
ASP.NET and Apache
The mod_mono Apache module runs the ASP.NET apps on the Apache Web Server, and manages requests between the application and external Mono process that hosts the ASP.NET application. This external host is part of the XSP module, called the mod-mono-server.
ASP.NET and XSP
Developed in C#, the XSP is a standalone web server that runs ASP.NET applications. It has its own library of pages and controls used for testing the server and ASP.NET apps.
ASP.NET with Nginx
ASP.NET can be hosted on Nginx (engine X), which is an HTTP server and high performance reverse proxy that supports ASP.NET and ASP.NET MVC web applications.
Future of ASP.NET
The industry was expecting ASP.NET 5 to be the next major development for ASP.NET, however, Microsoft has stopped active development to focus on ASP.NET Core instead.
ASP.NET Core is an open-source, cross-platform framework for developing and deploying cloud-based applications. Applications developed in ASP.NET Core can run on Windows, Mac, and Linux.
ASP.NET is still the preferred approach for enterprises as its a secure platform with extensive support and maintainability; however with the progression of MVC, Azure, Signal R, etc, .NET platforms will need to keep evolving to embrace new technologies.