
and is readable). As a website grows, and there is more
information that it would like to be able to provide, it
quickly becomes cumbersome to create a separate HTML
page for each possible information request and store it as
a separate file.
It is commonplace for the requested resource not to be
a simple static HTML page, but rather a “dynamic page,”
where the entire page, or a chunk of it, is obtained by
executing a program. Of course, if any deterministic pro-
gram is executed repeatedly, without changing inputs, it
will produce the same results every time. This is not very
interesting. The benefit of dynamic pages is obtained when
programs are run with different input parameters, speci-
fied in the resource request. The definition of a URL pro-
vides for this in the form of the search string that comes
at the end of the URL. This string is typically not
interpreted by the Web server. Rather it is passed on to
the program identified by the path part of the URL. This
program then executes with the search string as the input
parameter. The output produced is sent back by the server
as the response to the request.
Let us make this a bit more concrete. If the requested
resource is to be displayed as a Web page, then the output
of the program must be an HTML file. Furthermore, the
program need not accept only a single input parameter—
logically, it could have as many parameters as appropriate:
We merely have the entire set of parameters all encoded
into a single search string. (In fact, for security reasons,
many websites encrypt search strings so that the client
does not learn what the structure of the program on the
server side is and what sorts of parameters it accepts.)
Finally, there is nothing that prevents the program from
calling other programs and passing along some or all of
the invocation parameters obtained from the search string.
What would these programs compute? In theory, it
could be anything at all. In practice, the purpose is to pop-
ulate the information of interest on the result Web page.
Frequently, this information is obtained by performing a
database lookup. In other words, the server-side program
uses the information in the search string to generate a
query that it issues to a local database. It then uses the
database result to populate a Web page that it sends back
Chapter 9 XML AND WEB DATABASES 183