Overall Architecture of ASP

ASP files are script files that are interpreted as they are requested. An Internet Server Application Programming Interface (ISAPI) extension named ASP.DLL is mapped in IIS to files ending in .asp or .asa, as shown in Figure 12-1. ASP.DLL parses the .asp files for tags indicating the presence of code intended for execution on the server. ASP.DLL sends the script code to the Windows Script Host (WSH). WSH executes the script code and returns the response to ASP.DLL, which returns the result of the script code executions and the content inside the ASP file itself to IIS. IIS returns the response to the requesting software. ASP.DLL does not execute code such as validation functions written in JavaScript that are contained in the ASP and are intended for execution in the web browser or the software requesting the ASP file.

click to expand
Figure 12-1: Overall Architecture of ASP

Note 

For the purposes of this chapter, the client will refer to the software that is requesting a file from the web server.

In a typical web server/web browser relationship, the web browser is the client. In this scenario, the client makes requests to the web server. The web server responds by returning the requested file, and if that file happens to be an ASP file, the web server will perform some work prior to returning the response to the client. As expected, the work for which an ASP is responsible generally alters the response that is returned to the client.

The ASP also offers a great mechanism for gluing other systems and software together. It allows the developer to manipulate the data easily to and from IIS without forcing him or her to deal with the complexities of Hypertext Transfer Protocol (HTTP) and IIS. The classes offered in ASP with IIS provide a nice layer of abstraction to HTTP and the web server that many competing technologies, such as Perl and CGI, fail to offer the developer.

In some cases, the business logic may be encapsulated in COM objects. If the COM object provides an interface that is accessible by VBScript or JScript, the ASP can function as a dispatching mechanism. Chapter 13 presents a greater examination of the use of ASP with COM objects.




IIS 6(c) The Complete Reference
IIS 6: The Complete Reference
ISBN: 0072224959
EAN: 2147483647
Year: 2005
Pages: 193

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