Next: Further Information
Up: Forms: Facilitating User Input
Previous: An Example Form
One of the forces behind the development of the Common Gateway Interface was the desire to integrate databases with the Web. There are
several alternative approaches, and the CGI is one of the most widely used. There are several advantage to the CGI approach:
- One client can serve as a front end for multiple databases
- One database can talk to multiple clients, each with its native platform interface characteristics.
- Changing the database query model does not require changing all clients in the field-only the form documents accessed by
clients
And, of course, there are some difficulties:
- The interface does not support an exhaustive set of data types
- The forms interface is form oriented rather than field oriented, so that it is not as robust as it could be:
- it does not support client-side range checking for data values, and
- it requires the user to press a submit button for any server involvement.
- Navigation among various input fields can be awkward on some platforms
- CGI is built over HTTP which is a "stateless" protocol. That is, the connection between the client and the server is broken
as soon as
the server responds. Implementing "statefulness" in this environment is awkward, complex, and can be wasteful of computing
resources.
This is where we start on the real HTML markup for forms. (Remember, this is only half the story- the other half is the CGI program.) We've
already seen how the |<FORM>| tag works. Now we start creating ways for the user to enter actual data.
The user is perfectly free to add to, alter, or completely replace the contents of the input box if he feels like doing so, of course. If he does
nothing to the contents of the input, then its predefined value will be used when the form is submitted.
Sources of Additional Information
Next: Further Information
Up: Forms: Facilitating User Input
Previous: An Example Form
Dave Marshall
9/28/2001