Am I using COM Components now?
Yes - every time you use an ASP object such as Request, Response, ObjectContext,
Server, Application, and Session, you are using the ASP COM Server asp.dll.
This is a good time to clarify some misconceptions about the terms COM Server,
component, COM Object, and so forth:
A COM Server is a compiled file which may contain one or more COM components.
For example, the ASP file which gives you access to the ASP objects mentioned above is
asp.dll. This file is a COM Server. The components it contains, which are called
Class Modules in Visual Basic, are called components (also called COM Components).
Another example of a COM Server is scrun.dll - the Scripting Run-time Library
that gives us access to the FileSystemObject and Dictionary components.
These two components are refered to as objects when used in ASP. Why?
Because, an object is not a component - it is simply a reference or copy of a
component. When we want to use the components in scrun.dll, we don't
access the file directly from our ASP pages, we instantiate it into an
object. The object is created using the blueprint of the component.
COM Servers like scrun.dll have to be referenced manually by using ASP's
Server.CreateObject method or the OBJECT tag. To use the intrinsic ASP objects
such as Server and Request, you don't have to create a reference to each one -
simply use the object's methods and properties directly - they're ready for you to
use in your ASP pages.
A COM Object is simply a component which has been instantiated using a CreateObject
method or OBJECT tag.
|