ASP (Active Server Pages)
November 1, 1999
|
SSI based technology is limited to the range of commands/tags
offered by the SSI-enabled web server provider. Web developers
needed a way to embed dynamically
interpreted code into HTML that can be processed by the web
server on demand. Thus was born ASP.
|
For example, what happens if you need to define operations not
supported by the operating system (SSI-traditional) or the
custom web server (SSI- Cold Fusion style)? What happens
when you need to code your own tag logic?
What developers need is a way to embed dynamically
interpreted code into HTML that can be processed by the web
server on demand. That way every web site can develop its
own set of custom tags.
What was needed was a hybrid CGI-SSI animal.
And thus was born ASP. ASP is a server extension of the
IIS web server released by Microsoft
(By the way,
Apache does
have MOD_ASP at this stage so that you can code ASP pages on
Apache web servers. Also third party vendors also provide
ASP functionality for non-IIS servers.). ASP allows
developers to code custom tags in
JavaScript (JScript) or
VBScript. These tags can be interpreted by IIS before the
pages are sent out.
|
At about this time, by the way, Apache and ActiveState were
making embedded Perl interpreters a reality. This meant that
the overhead of loading the perl interpreter was no longer
required. Perl with MOD_PERL is just as fast as
ASP and provides all the same functionality.
|
An ASP page at its core is simply a text file that has been
named using the extension .asp and which contains HTML and
scripting. Scripting, usually in VBScript provides a means
to embed programmatic logic into HTML files that will be
dynamically interpreted as the HTML page goes through the web
server and also provides access to any server side object.
|
NOTE: Like all server side technologies, functionality
provided by ASP is completely cross-browser. All processing
is done on the server side and the results of processing are
displayed as plain HTML or images. Thus, a web developer can
easily use the power of Excel or Power Point on the server
side to generate graphs and charts that can be seen by a
user running a UNIX-based web browser.
|
Like SSI, ASP provides a means to specify a "tag" with
instructions that should be interpreted by the web server.
However, unlike SSI, ASP has a robust set of objects that you
can use to do serious programming. It also gives you the
ability to instantiate server side resources (any COM
component). Consider the following simple ASP page:
<HTML>
<HEAD>
<TITLE>Test ASP</TITLE>
</HEAD>
<BODY>
<% @Language = "VBScript" %>
<% Response.Write("Hello cyberspace") %>
</BODY>
</HTML>
In the above example, you saw the "Response" object being
used to print a message out to the web browser. ASP has a
whole set of objects for the convenience of the application
developer . These objects conveniently cover all key aspects
of creating dynamic web pages.
The basic object hierarchy builds off the Scripting Context
Object (which you will never really use itself) and looks
something like the following:
Scripting Context
Request
Response
Application
Session
Server
Contents:
COM and Active-X
Server-Side Java
Distributed Resources DCOM, CORBA, RMI
SSI Directives Cont.
Introduction to the Web Application Development Environment (Tools)
COM and Active-X
|