| |
Active Server
Pages (ASP) is a server-side scripting environment that
you can use to create and run dynamic, interactive Web
server applications. With ASP, you can combine HTML
pages, script commands, and COM components to create
interactive Web pages or powerful Web-based applications,
which are easy to develop and modify.
If you are an
HTML author, you will find that server-side scripts
written in ASP are an easy way to begin creating more
complex, real-world Web applications. If you have ever
wanted to store HTML form information in a database,
personalize Web sites according to visitor preferences,
or use different HTML features based on the browser,
you will find that ASP provides a compelling solution.
For example, previously, to process user input on the
Web server you would have had to learn a language such
as Perl or C to build a conventional Common Gateway
Interface (CGI) application.
With ASP, however,
you can collect HTML form information and pass it to
a database using simple server-side scripts embedded
directly in your HTML documents. If you are already
familiar with scripting languages such as VBScript or
JScript (JScript is the Microsoft implementation of
the ECMA 262 language specification), you will have
little trouble learning ASP.
Since ASP is
designed to be language-neutral, if you are skilled
at a scripting language such as VBScript, JavaScript,
or PERL, you already know how to use Active Server Pages.
What more, in your ASP pages you can use any scripting
language for which you have installed a COM compliant
scripting engine. ASP comes with VBScript and JavaScript
scripting engines, but you can also install scripting
engines for PERL, REXX, and Python, which are available
through third-party vendors.
If you develop
back-end Web applications in a programming language,
such as Visual Basic, C++, or Java, you will find ASP
a flexible way to quickly create Web applications. Besides
adding scripts to create an engaging HTML interface
for your application, you can build your own COM components.
You can encapsulate your application's business logic
into reusable modules that you can call from a script,
from another component, or from another program.
A server-side
script begins to run when a browser requests an .asp
file from your Web server. Your Web server then calls
ASP, which processes the requested file from top to
bottom, executes any script commands, and sends a Web
page to the browser.
Because your
scripts run on the server rather than on the client,
your Web server does all the work involved in generating
the HTML pages sent to browsers. Server-side scripts
cannot be readily copied because only the result of
the script is returned to the browser. Users cannot
view the script commands that created the page they
are viewing.
Many people forget
that ASP isn't just for making dynamic HTML pages. ASP
can be used to create pages of all kinds, or even binary
data, like images. Some examples have used XML, audio
play lists, text files, GIFs, and JPEGs - literally
anything with a MIME type that he browser recognizes.
The code needed
to make this happen is really quite simple. It takes
only one line to change the HTTP header to produce a
different MIME type, and thus force the web browser
to interpret the file differently. One application for
this ability is to create a style sheet using ASP. |