Application instances and interaction with the server

next up previous
Next: Session identifiers
Up: Implementation
Previous: Pages

Application instances and interaction with the server

When the user wants to start up a new application, he or she must use a special syntax for the URL, marked by a dollar sign. For example, $lg2/main requests page main belonging to application lg2.

The server script starts by examining the incoming URL. If it has the above syntax, the server creates a new instance of the appropriate application. Applications are objects just like other Web objects: when an application instance is created, it automatically creates an instance of each of its entry pages, i.e. those pages which the client can request on an initial transaction. It will then call the emit method of the page requested by the client, and send back the resulting HTML. In our factorial example, the application would contain just one page.

One very important fact is that in our implementation language Object Rexx, instances continue living after the program that created them has finished running. This means that the instances created in one transaction with the server will still be available (unless the machine crashes) when the client engages in the next transaction.

Jocelyn Ireson-Paine
Sat Oct 12 23:35:52 BST 1996