Next: How the server decodes URLs
Up: The server interface
Previous: The server interface
There are five types of URL:
- Class URL
- These contain the name of a class, and ask the
server to create a new instance of it and send back its HTML.
- Instance URL
- These contain an instance identifier, and ask the
server to locate the corresponding instance and send back its HTML.
- Instance selection URL
- These are like instance URLs,
but also ask the server to make the specified instance the
current page of a book (see Section 2.16).
- State-change URL
- These also contain an instance identifier.
They ask for its HTML to be sent back, but only after the instance's
state has been updated with data from the user. In general, a
state-change URL will also point at a form or some other trigger.
- Null URLs
- These are mainly useful with client-side programs
in, for example, JavaScript. They are used when the client program
needs
to
send some information to the server but does not want a reply. The
JavaScript code in Tow uses them to inform the server that the user has
selected a new page, even if the client then withdraws it from the
cache rather than asking the server for it.
Most of the time, the only type of URL the Web-page author will write
explicitly
is
a class URL. Our Introduction to Tow page, for example,
contains some explanatory material about the application and how to use
it, which is followed at the end of the page by a link saying
Go to Tow
. In HTML, this is coded as
<A HREF="http://www6.ifs.org.uk/New$Tow">Go to Tow</A>
This represents a gate, if you like, from the non-WOM world to that of
WOM, and since written outside WOM, the author has to know how it is
represented. However, inside WOM source code, the author should always
refer to parts of the application by WOM elements such as
<InstanceLink>
.
Each of these emits itself as a string which includes its type
(Instance$
, StateChange$
etc). It also contains the
identifier for the session, so that the server can find the correct
instance when it receives the URL back. It may also contain other
information. For example, all URLs can contain instance paths to request
HTML from any instance reachable by a path from the root.
Next: How the server decodes URLs
Up: The server interface
Previous: The server interface
Jocelyn Ireson-Paine
Fri May 30 14:03:06 BST 1997