This module covered the structure of an ASP web application. We've also looked at further uses of the Global.asa file, including how it works with application variables.
You were introduced to the race condition, a problem that arises when multiple users simultaneously share an application variable.
Finally, we looked at the FileSystemObject, which allows you to dynamically write information to and read from text files.
Now that you have completed this module, you should be able to:
- Describe the setup and operation of a Web application
- Specify Application start and end procedures in the Global.asa file
- Describe uses for application variables with multiple users
- Explain how application variables may be incorrectly updated
- Read and write text files with ASP
- Create a file with ASP that can be read by a user application
In this module, you were introduced to the following new terms:
- Application object:An ASP built-in object which represents the common information shared by all concurrent users of an application. An application is the set of all ASP files in a virtual directory and its subdirectories.
- DSN:Data source Name. The name, defined at the time the datasource is created, which is used to identify a particular ODBC datasource. There are User, System and File DSNs, each of which is visible to different ODBC clients. With ADO, you must set up a System DSN (which is visible to all users).
- Encoding:On the Web, encoding usually means translating one character set into another.
For example, the HTML specification does not allow for angle brackets (< and >) to be embedded directly into text because of their special meaning within HTML. Instead, HTML encoding specifies that they be translated to < and >, respectively.
- OLE:According to Microsoft, OLE no longer stands for Object Linking and Embedding, but that's what it enables. With OLE, objects can communicate with one another and use each other's capabilities.
For example, if you follow a link in Internet Explorer to a PowerPoint presentation, Internet Explorer will display the PowerPoint presentation within the browser window, as though it were HTML.
- Query:An information request. Usually query means a request for data from a database, and is processed by a database manager which returns a result.
- State:The internal condition of an object or dialog. HTTP is basically a stateless protocol, which means that each new connection from client to server is independent of previous connections, i.e. the Web server forgets everything after each connection.
- Virtual directory:A directory which appears to exist when accessing the Web server, but might have a different structure in reality.
For example, the top-level (or root) directory is usually virtual because to the Web server it's simply / (the root directory), but on the underlying computer the directory might actually be: E:\Web\IIS\WebRoot\.
The next module will discuss connecting a database to a Web site using ASP.