next up previous
Next: Introduction and Motivation

A declarative approach towards ensuring auto-completion and auto-update of HTML form fields

Sunil Kothari

Abstract:

Form field relationships, when modelled appropriately at the client-side, can greatly enhance the usability of new and existing forms by providing for auto-completion and auto-update of form fields without making a round-trip to the server. Traditionally, field relationships are handled exclusively at the server-side, in which case no associated JavaScript mechanisms are required, or at client-side by means of highly customised JavaScript code. Both approaches have associated pitfalls. Server-side handling of form field relationships makes such an approach server and network dependent whereas, client side handling of relationships exposes a programmer to a full programming language. Further, JavaScript has an operational form and makes a programmer think about the order in which the relationships should be used to auto-update and auto-complete. Additionally, consistent behaviour of relationships is not guaranteed as different browsers handle JavaScript differently.

We suggest an approach that allows declarative specification of form field relationships. Our approach serves the niche where the form is independently created or perhaps automatically generated by a tool and where the field relationships are added at a later stage or in some cases, separately specified. The relationships are specified in a high-level domain-specific language that exposes a programmer to only the relevant details. This helps in modular development of forms and makes forms specifications easier to read, write and maintain. The non-uniform behaviour of JavaScript is handled by translating high-level specifications to a subset of JavaScript that all browsers implement. The auto-update and auto-completion of form fields is accomplished by incorporating a rule-based mechanism that satisfies relationships through a fixed-point process. Our language is expressive enough to model a large subset of relationships that can occur in HTML forms.

We illustrate the entire methodology by a number of examples.




next up previous
Next: Introduction and Motivation
Sunil Kothari 2006-04-29