5.3. Formbuilder Service

Most applications built with WAF allow users to enter information into the system through a web browser. A user fills out a number of fields in a form and clicks the Submit button. The user's input is validated and stored for later retrieval and display.

Building complex applications with this sort of user interaction usually requires programmer involvement. For example, if you are building a web browser based email client, you need to write code that knows how to send and retrieve email messages, how to organize messages in folders, and so forth.

There are another class of applications that do not require any special handling of the input data. What is required is the ability to enter the data in a structured way, and retrieve it later for display, reporting, printing and so forth..

For example, a group of users wants to input and store data about competing products — they want to record the product name, the company's name, a short product description, and the date it was first introduced to the market. Rather than requiring programming for this straightforward functionality, WAF provides the formbuilder service.

The formbuilder service enables non-technical users to build such applications via a web interface, without any programmer intervention. The formbuilder service provides a variety of widgets to choose from, such as a date widget which makes the part of the HTML form that allows you to specify a date. Validation code is automatically attached to the date widget to ensure that only valid dates are entered. Various widgets are provided for entering simple strings, numbers, etc.

Once the user has defined the required fields for their custom new document type, the system automatically allocates structured storage in the database. From this point on, other users may enter documents that require the specified fields to be filled in. Such documents are displayed in the tabular format:

Product namegizmo
Company nameAcme, Inc.
DescriptionThis gizmo slices, dices, and juliennes.
Date introducedJuly 22, 1999

Table 5-1. Sample structured document