Vista Software
Apollo ASP Technical Information

Apollo ASP™

ASP Introduction

ASP development requires that various software components be properly set up on your web server before ASP pages can be hosted. Support for ASP is built into Internet Information Server (IIS) version 4 and 5 and is also included with Internet Services Manager that ships with Windows 2000 Professional.

ASP technology is relatively new. It was introduced by Microsoft in 1996 as a web technology, not a product, with goal to solve the problem of how to effectively manage dynamic HTML content on the Internet without imposing restrictions on the use of a particular web browser. ASP does an outstanding job of both solving this problem and in making it easy for developers to deliver solutions using this technology. In fact, current estimates suggest there are over 1,000,000 ASP developers world wide.

Furthermore, as was one of the goals of ASP, it doesn't matter what browser is used to view ASP pages since the actual content viewed by the browser is pure HTML. The ASP code is processed on the web server and the resultant HTML produced is what gets downloaded to the computer viewing your web site.

Microsoft made ASP flexible enough to support, not one, but several scripting languages including VBScript, JavaScript and soon to be, PerlScript. That means developers can choose how to write ASP code.

How does ASP work?

Instead of creating HTML documents (.html or .htm), you create ASP documents (.asp). In fact, you can rename your HTML documents to ASP and they will continue to work exactly as expected. Typically, ASP code and HTML code are both intermingled in the same ASP document. This is somewhat confusing for developers new to ASP, but it quickly becomes understood.

So how does ASP work? Let's assume you have a web server setup and that it is running IIS and that you have both HTML and ASP documents on your web site. Lets now assume someone visits your web site. When a request to view an HTML document (.html or .htm) is made by a browser visiting your web site, the IIS running on your web server simply loads the requested HTML document and sends it to the browser that made the request. When a request is made for an ASP document (.asp), the IIS managing your web server does not simply load and send the document to the browser making the request. Instead, IIS processes the requested ASP document, looking to "run" or "execute" any embedded ASP script code it finds. This script code can be written in VBScript or JavaScript.

In summary, any document with an ASP extension is loaded and processed differently by IIS than an HTML document. An ASP file can have no ASP code present, or it can have lots of ASP code in it. It doesn't matter. Because the document has an .asp extension, IIS automatically loads and scans the document looking to run script information. Keep in mind that all this processing is done on the web server itself, and not on the client computer. The end result is that the web server is responsible for processing ASP files and delivering HTML content back to connected web browsers.

Another cool thing about ASP is that only HTML code is sent back to the web browser. This means that your ASP source code (i.e. VBScript and JavaScript) is never sent to the browser so nobody can see it! This is done for you automatically by IIS on the web server. The embedded ASP script is ripped out by IIS as it is processed.

For those of you not running IIS, you may be interested to read the following article describing how to run ASP on NT without IIS using Chilisoft and Apache web server products.

  • Click here for details.

Getting started with ASP

Let's try some ASP code. This section assumes some basic knowledge of HTML. Before we begin, make sure your Personal Web Server, IIS or Internet Services Manager (under Windows 2000) is properly configured.

Once you have configured your web server to support ASP pages, lets try to create our first ASP page.

  • Click here for information on how to configure your web server.
  1. Run Notepad or use your favorite text editor and copy the following text.

    <HTML>
        <
    BODY>
            <
    B>Welcome to Apollo ASP!</B
    >
            <BR>The time is: <%=Response.Write(TIME())%>
            <
    BR>
         </
    BODY
    >
    </
    HTML>

    This HTML code is very straightforward, except for the the "Response" section of code. This is ASP code mixed in with HTML code.
  2. Save this file to the directory c:\Inetpub\wwwroot\ and name the file myasp.asp
  3. Run your browser (IE or Netscape) and enter one of the following: http://127.0.0.1/myasp.asp or enter http://yourmachinename/default.asp.
  4. The text: "Welcome to Apollo ASP!" should appear, followed by "The time is:" followed by the current time.

How is this possible you ask? Remember, before ASP documents get sent to the browswer, they are processed by the web server. The text between the <% %> symbols marks ASP code. The server recognizes these symbols and tries to process whatever is contained between them. "Response.write" is a built-in ASP object that basically writes out text.

Where does Apollo ASP fit into the picture?

Until recently, Internet web sites have been primarily static in nature, in that web developers would create HTML documents using FrontPage, Homesite or Notepad and upload them to their web sites, making changes and re-uploading the files as needed. With the introduction of ASP, web developers now have the power to do some really cool things with web sites. Specifically, web developers can write ASP code that alters the content of their web pages based on other data, including data extracted from databases.

Web users today have grown very accustomed to interacting with web sites, for example, they enter contact information, order products from shopping carts, request information and so forth, with ease. Where does all this data go? More to point, where does it get stored? Enter Apollo ASP.

Before Apollo ASP, developers typically used MS-Access or SQL Server to manage web-based data. Although both products work, neither was designed specifically for the web. MS-Access basically falls apart when multiple people access the same database. In fact, Microsoft themselves caution against using MS-Access as a web-based data server! And SQL Server is for the most part, overkill for managing the vast majority of data requirements on small to medium sized corporate web sites. The need for a small and fast SQL database engine that is easy-to-deploy and can scale well has been filled with Apollo ASP.

Apollo ASP is an optimized COM server that allows web developers to interact and manage data on a web server. Apollo ASP is a COM interface into the Apollo database engine, which is sometimes referred to as the SDE. The included Apollo SQL™ technology provides full support for SQL-92. The SDE database engine and Apollo SQL are the core database technology used in all Apollo database products.

Up and running with Apollo ASP

After installing Apollo ASP onto your web server, the ApolloASP.dll which contains the Apollo ASP COM interface, will be registered as a COM server on that computer. The individual web sites managed by the IIS running on the web server will now be able to use Apollo ASP. In fact, any development environment capable of using COM objects will be able to use Apollo ASP!

Apollo ASP includes several example ASP pages that demonstrate how to use Apollo ASP from within ASP pages. Please click on the following link to learn more:

Apollo Database Engines