Chapter 4 library objects during script runtime
The previous section describes how ASP can use an instance of an object defined on the server to fully utilize the provided methods and attributes to expand ASP performance. There are a series of objects available for use, including script objects and standard IIS/ASP installed components, as well as self-created or purchased objects from other vendors. You can also download objects from various websites on the Internet for free and use them on your own pages.
This chapter will discuss the objects generally referred to as the Scripting Runtime Library provided by the ASP script environment. These objects are provided to the code through the script engine in use, and are used together with the ASP script program to complete a variety of practical tasks.
Another Component is the Active Server Component, which is implemented through a separate ActiveX DLL file or other files. The following sections will discuss the relevant content.
Of course, you need to study how to use these objects on the page. In the previous chapter, we have learned how the server provides a method to instantiate an object. This chapter will discuss this in depth.
This chapter introduces the following:
· What does the script engine provide as a script object.
· How to create script objects and other component instances.
· Summary of the members and attributes of the script object.
· How to use script objects in code.
The following describes the definition of the script object.
5.1 script object definition
The ASP object model is studied in the previous chapter.
Object model is a basic means to understand the relationship between various parts of the system.
The ASP object model provides a structure to manipulate HTTP requests, responses, and different elements in the ASP environment as a whole. For example, we have seen how to obtain any cookie value from the browser by viewing the cookie set of the ASP request object.
The scripting language we use also has an object model. However, this object model provided by the scripting language is different from the object model directly provided by asp dll. The script object is run by the Microsoft Script runtime library (scrrun. dll). When the default Active Scripting script engine is installed, the Microsoft Script runtime library is also installed.
5.1.1 different types of objects and components
Don't be confused about the terms "object" and "component". They can all be part of ASP within a certain range and can also be accessed through COM. In terms of concept, they can be divided into four categories:
· ASP built-in objects, such as ObjectContext, Request, Response, Application, Session, Server, and ASPError. From Chapter 1 to Chapter 2 of this book, I have studied these contents.
· Script object. Used by the library during the script runtime, such as Dictionary, FileSystem, and TextStream. This is the object to be discussed in this chapter.
· Installable components. Provided by Microsoft during standard installation of IIS 5.0 and ASP 3.0. This will be discussed in the next chapter.
· Other components. Components purchased from other independent vendors, discovered on the website, or created on their own. There are also some other components provided by Windows services or products, such as Windows Scripting Host. A list is provided in the appendix of this book. This book has some chapters dedicated to describing how to build your own components.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service