ASP, ASP.NET, ISAPI, and legacy CGI

ASP

ASP stands for Active Server Pages and was developed by Microsoft for version 3 of IIS, which was part of the Windows NT 4 Server platform. ASP is a server-side scripting environment that can be used to create dynamic and interactive web applications. ASP pages usually have the file extension .asp and are generally written using Visual Basic Scripting Edition (VBScript) or JScript, two scripting languages developed by Microsoft specifically for the ASP environment (VBScript is an offshoot of Visual Basic [VB], while JScript is Microsoft’s equivalent of Netscape’s JavaScript language). However, the ASP model can be extended to use scripts written in other languages such as Perl, which is commonly used on UNIX platform web servers like Apache.

The way ASP works is that a client (web browser) begins by requesting an .asp page from a website or virtual directory on IIS. When the server receives the HTTP request, it passes the request to the ASP script interpreter, an ISAPI extension called asp.dll. This interpreter then processes the script and generates an HTML response for the client and/or performs some other action such as calling a COM component in order to write a record to a database.

ASP.NET

ASP.NET is a brand new programming model from Microsoft for developing dynamic web applications for IIS 6. ASP.NET is more than just a new version of ASP. It incorporates important features of Microsoft’s new .NET Framework, such as the common language runtime (CLR), which allows ASP.NET applications to make use of inheritance, type safety, versioning, and language interoperability, and enabling ASP.NET applications to be more robust, scalable, and reliable than legacy ASP applications. ASP.NET also supports the latest web standards such as Extensible Markup Language (XML) and Simple Object Access Protocol (SOAP), which makes ASP.NET an ideal platform for developing enterprise-class web services.

ASP.NET supports many more programming languages than ASP, making it a much more flexible development environment. Among the languages ASP.NET natively supports are VB.NET, JScript.NET, and C#. ASP.NET recognizes most ASP code, too, which makes it relatively easy to migrate, legacy ASP applications to the ASP.NET platform. ASP also supports COM+, the latest version of Microsoft’s architecture for developing distributed applications.

In addition to these improvements, ASP.NET simplifies the process of building applications by providing server controls for displaying data, validating, user input, and other common tasks. These controls generate HTML code that works with any web browser and enable ASP.NET applications to be written faster and with less code than legacy ASP applications. Using Visual Studio.NET, you can rapidly build and deploy ASP.NET applications with the same ease with which you can create VB applications. For example, you can visually design a Web Form by dragging and dropping controls onto the page and double-clicking them to configure their parameters. This is indeed cool.

Other advantages of ASP.NET over ASP include:

  1. Easier deployment Simply copy your ASP.NET files to your web server. You don’t even need to restart the server to get your application up and running.
  2. Better performance ASP.NET runs as compiled code, it’s not interpreted like ASP. This can significantly improve the performance of your web applications.
  3. Flexible caching ASP.NET can cache entire pages or portions of pages as needed to increase application responsiveness.
  4. Better internationalization ASP.NET uses Unicode (UTF-8) internally for representing request/response data.
  5. Easier debugging ASP.NET includes a tracking feature that makes it easier to debug faulty applications.
  6. Easier configurability ASP.NET configuration settings are stored in text files and formatted in XML for easy editing.
  7. Web farm session state ASP.NET lets multiple IIS servers in a web farm share session state information for a single application, making IIS more scalable.
  8. Improved crash protection ASP.NET automatically detects memory leaks and deadlocks and tries to recover from them with no intervention needed.
  9. Support for .NET Framework This support includes .NET class library, Web Forms, and XML Web Services.

ISAPI

Internet Server Application Programming Interface (ISAPI) was created by Microsoft as a replacement for the CGI processing model popular on UNIX web server platforms. ISAPI really represents two kinds of routines:

  1. ISAPI applications These can be called from any web page to perform dynamic and interactive functions like accessing a database or validating a form. Another name for these is ISAPI extensions, because ISAPI can extend the functionality of IIS beyond serving static HTML and do things similar to what ASP applications do (only faster). ISAPI applications can be written in several different languages but are usually written in C++ for best execution performance. ISAPI applications can be configured at either the web site or virtual directory level, so a single web site may have multiple ISAPI applications running in different directories performing different application-related tasks when they are called.
  2. ISAPI filters These are used to preprocess and post-process HTTP requests and perform actions such as compressing or encrypting information, performing redirection, monitoring security, and so on. ISAPI filters are always written in C++, as they usually examine all incoming traffic for your site and so have to be built for speed. ISAPI filters are always configured at the web site level—you can’t configure an ISAPI filter for a virtual directory within a site.

The main advantage of ISAPI over CGI is that it avoids the performance penalty incurred by CGI, which spawns a new process each time code is run. However, the problem with the ISAPI model is that you need C++ or similar high-level programming knowledge to develop ISAPI applications and filters, while CGI apps are commonly written using Perl or some other interpreted scripting language. Because of the development cost of writing C++ code, Microsoft developed the simpler ASP model described earlier that is more widely used than ISAPI.

CGI

The Common Gateway Interface (CGI) is a programming model originally developed for web servers running on the UNIX platform. CGI programs are typically either scripts written in Perl, Python, or some other scripting language, or executables written in C or C++. On UNIX web servers, these programs are usually placed in the cgi-bin directory on your web server and called from web pages for performing tasks such as processing input from forms or writing a record to a database. IIS supports CGI mainly to simplify the process of migrating applications from UNIX to IIS.

(Visited 10 times, 1 visits today)


Related Posts:

146
Author - admin_specindia

POPULAR BLOGS

Archives

  • 2018
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • Related Blogs

    Current Openings
    Scroll Up