Developing Web Applications
|
|
Building Windows Script Components
As you develop Web applications, especially when using ASP, you will find that your scripts tend to grow beyond your original intentions. This is a natural evolution of the middle tier that often occurs in the planning and development of an n-tier Web application. You may also decide to develop COM components in order to handle middle-tier logic for your applications.
ASP supports Microsoft® Windows® Script Components, a technology that provides a way to develop COM components by using scripting languages, such as VBScript, Microsoft® JScript® 2.0, JavaScript 1.1, PERLScript, and other languages compatible with the ECMA 262 language specification. Windows Script Components, which you can use as you would other COM components, provide many benefits in that they:
- Allow you to encapsulate scripted tasks as reusable COM components.
- Enable you to easily develop prototype COM components to be converted using a suitable programming language, after you are satisfied with your component’s design and functionality.
- Provide access to a wide range of system services, just as other COM components do.
- Are small and efficient.
- Are easy to create, maintain, and deploy.
- Are supported by Component Services, a run-time environment for COM components.
Windows Script Component technology consists of:
- The script component run time (Scrobj.dll).
- Interface handlers, which extend the run time. These are compiled components that implement specific COM interfaces. When you install the script component run time, you receive the Automation interface handler, which allows you to call your script component from an .asp file.
- Your script component file (an .sct file), in which you specify which interface handler you want to use, and which methods can be called from an .asp file in order to accomplish the intended functionality.
© 1997-1999 Microsoft Corporation. All rights reserved.