![]() |
|
[Introduction][The Browser's Result of a Computed ASP page][Personal Web Server][Sending Data to the user] The Browser's Result of a Computed
ASP File Processed ASP pages are plain HTML after the Web server has finished processing the ASP page. See Figure 1.13 for a schematic overview of how this processing is done. FIGURE Processing of an Active Server Page request. Suppose we have an asp page called test.asp 1. The client requests the page test.asp from the server. The Web server checks the file extension to see whether a special program (such as the Active Server Pages engine) must be invoked to process the request. If there's an .asp extension, the Web server determines that it should invoke ASP to process this page. 2. If this page has never been requested before or has been changed since the last request, it must be parsed and the syntax checked and compiled by the Web server. During the parsing process, the HTML and scripting code are separated. IIS determines which scripting engine is responsible for which part of the script and delegates the work of syntax checking and compiling to the proper scripting engine (such as VBScript). 3. Now the code is executed by the scripting engine using resources from IIS, which is hosting the scripting engines. All objects that the language engine cannot handle are requested from IIS, which is also responsible for handling inputs and outputs for external ActiveX objects that are created and used inside the script. If it is not able to supply the object, an error is generated. 4. Script output and static HTML code in the ASP file are merged. 5. The final HTML is sent back to the user in an HTTP response. An ActiveX object provides--as every component does--reusable code stored in a wrapper, which provides access to the object through properties, methods, and events. Additionally, the code of the ActiveX object is running in the same process space as the application that uses it. ActiveX provides a standard mechanism to extend any programming or scripting language using the same reusable object. ActiveX Data Objects (ADO) are ActiveX objects that provide an interface to OLE DB, so you can access nearly any database through ADO. ADO is the first choice if you want to access a database from an ASP file. |
|
![]() |