Flow of Control in WDB.
Next: The Form Definition
Up: Architecture
Previous: Architecture
The actual flow of control is perhaps better illustrated in the following
diagram :
Figure 4: Flow of Control
What happens is the following
- The users "clicks" on a URL leading to the WDB script. The URL
contains some extra information in the path (PATHINFO), specifying
what information in the database s|he would like to query. This is
typically obtained from a normal hypertext page with a menu of
available query forms.
- The server receives the URL, starts the WDB script and passes
the extra information in PATHINFO, actually the name of the
Form Definition File (fdf\) to use and the word "form".
- WDB reads the fdf and generates an HTML form according to the
specifications in the fdfThe form is returned to the user and
WDB exits.
- The user fills out the form with her query constraints and presses the
"Submit" button. This sends the WDB URL (with PATHINFO) plus the
contents of the form (encoded) to the WWW Server.
- The server receives the URL, starts the WDB script and passes
the extra information in PATHINFO plus the form content.
- WDB parses the PATHINFO which in this case is the name of the fdf plus
the word "query". This tells WDB to construct a SQL query from the
information in the fdf file and and the user's constraints.
- The SQL query is send to the database server.
- The database server processes the query and returns a number of rows.
- WDB retrieves the rows from the database server and after having
converted the data according to the specifications in the fdfconstructs an HTML page with the result. If more than one row was
returned, a tabular output format is chosen, allowing the user to
select a row, via a hypertext link, to get all the details.
- The HTML page is returned to the user and WDB exits.
- The user clicks on a hypertext link for a row. This link contains
the WDB URL with the fdf name, the word "query" and the key(s) for the
current row in the PATHINFO.
- The WWW server receives the URL, starts the WDB script and passes it
the extra information in PATHINFO.
- WDB constructs a new database query, this time using the key(s)
instead of the form contents.
- The database process the query and returns the result.
- WDB retrieves the row from the database server, converts the data
according to the specifications in the fdf and this time, as only one
row is returned, constructs a HTML page with all the details.
The HTML page is returned to the user and WDB exits.
- etc.
Next: The Form Definition
Up: Architecture
Previous: Architecture
Bo Frese Rasmussen
Fri Nov 25 16:28:57 MET 1994