eComet
Tutorial
(Version 02.01)

Introduction
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24
Lesson 25
Lesson 26
Lesson 27
Lesson 28
Lesson 29

Summary

Applets
Utilities

Installation
Debugging
Security

Download

Index


Powered by
eXtended Active Page
(XAP) technology from Signature Systems, Inc.

Patent Pending.

Date: 09/09/2010

Copyright 1999-2002
Signature Systems, Inc.

Introduction
Welcome to the tutorial for eComet. This tutorial will show you how to create interactive Comet applications for the web.

As a developer of web-based applications, you will be creating code for both of the systems shown in the above diagram.

  • For the web browser, you will be using HyperText Markup Language (HTML) to make web pages. (Optionally, you can add JavaScript code to enhance the appearance of your web pages.)

  • For the eComet system, you will be using Signature Systems' Internet Basic compiler language.

Here's the fun part. Your Internet Basic programs can generate and send HTML to the web browser. That means you'll be able to add dynamic content to a web site, just by writing a few lines of Internet Basic code and using Signature Systems' eXtended Active Page (XAP) technology.

As we said above, these lessons will show you how to create interactive applications for the web. Here's how this works:

  • The web browser can send data to an eComet system. This is typically done with a form and a submit button, such as this very simple example:

    If you've ever used a search engine, you've seen how this works. You type something into the text box and click on the submit button. At that point, the data from the text box gets transmitted to a program running on a server. In our case, the server is running eComet, which in turn is running your Internet Basic program.

    (The above form doesn't really process the data. We just included it here to show you what a simple form looks like. You'll see some real examples in a few lessons.)

  • Your Internet Basic program can process the data it receives from the web browser. It can then generate and send a new web page back to the browser. That web page could contain another form and submit button, providing the web browser with a way to send more data to eComet.

The result is a dialog between the web browser and eComet. In other words, you've created an interactive web page that has access to all of the features of a Comet system, including access to Comet data files.


It's easy to get started. Here's some basic information:

  • eComet works with the standard web browsers, including Netscape Navigator and Microsoft Internet Explorer. Depending on the HTML commands you use in your web pages (and commands in additional tools such as JavaScript), you may see some differences between browsers and versions of browsers. Our advice is to use HTML commands that are supported by all of the browsers.

  • The eComet system must be configured to support communication with a web browser. This is a simple step that involves adding a gateway to your system configuration. (We'll explain the details below.)

    You'll have to configure a Comet directory named XAP, where all of your eComet object programs must be located. You can have data files in other Comet directories, but your web applications must be in this directory. This is for security purposes, as a way to limit access to your Comet system. eComet restricts the web browser and only lets it run programs that are the XAP directory.

    You'll also need a special Comet program that activates the eComet features. This is an object program named XAPMON. Typically, you will run this program when you start Comet (for example, via the QSTARTX startup program). Once this program is run, the eComet features remain active until that Comet system is terminated.

    When you run XAPMON, you must specify which port it will use for communications. For example, on Signature Systems' eComet site, we're using port 8080. This means that eComet is "listening" to port 8080 for data from a web browser. When it "hears" a request on port 8080, it receives the data and activates the object program name sent to it as part of the request. (See below for the exact format of such requests.)

    You'll also need to configure some background partitions on your Comet system. Here's why. Every time a web browser sends a request to your eComet system, Comet processes the request and activates your Internet Basic program in a background partition. Your program, in turn, processes whatever data it needs to, then sends a web page back to the web browser.

    Some advice: Since all eComet programs run in background, configure enough background partitions to handle the expected number of simultaneous requests being made by web browsers.

    For more information, see the Installation and Configuration section of this tutorial.

  • Next, you'll be creating an Internet Basic source program. This tutorial includes dozens of examples and will also introduce you to a few new Internet Basic statements.

    When you're ready to go, compile your program and put the object program in the XAP directory.

  • To run your program, use a web browser. In the place where the browser asks for a URL or web address, enter the following information:

    1. HTTP://

      This tells the browser than your request will be made using HyperText Transport Protocol (HTTP), the standard communications method for sending web-based information over the Internet.

    2. Domain name or IP address

      This is the domain name or IP address of your eComet system. In Signature Systems' case, this is: signature.net

      If you are running eComet on your own, local system, you can use localhost (the default name for your local machine) or 127.0.0.1 (the default IP address for your local machine).

      You can also run eComet on an intranet, by using the IP address of the eComet machine.

    3. :Port number (optional)

      As we said above, the XAPMON program tells eComet to "listen" on a specific port. When you include this port number as part of a URL, you are attempting to contact eComet on that port.

      In Signature Systems' case, we're using port 8080.

      See the Installation and Configuration section of this tutorial for more information about port numbers.

    4. /XAP

      This is the Comet directory name where the XAP object programs are stored.

    5. /Object program name

      This is the name of the Comet object program you want to run. This program must be located in the XAP directory.

    6. Miscellaneous information (optional)

      The URL may also contain information following the object program name. There are two types of information that you can include here: query strings and additional path information. Both of these are discussed in lessons in this tutorial.

    Here's an example. Let's say you want to run an object program named HELLO, and that program is located on the Signature Systems' eComet site.

    You would enter the following URL:

Want to see the Internet Basic code for the HELLO program? Then, go to Lesson 1 and learn how to write your first eComet application.


[Lesson 1]