Background

edit

The XForms standard arose from the desire of many people to use the web for more than just linking documents. The original design of the world wide web standard introduced many innovative concepts including the URL, the HTML markup language and the HTTP protocol.

But innovation aside, elegant form processing was not one of the design goals of the initial HTML language. In fact, many of the advanced input fields were added to the HTML specification after it became popular.

One thing is clear: the introduction of clean MVC concepts were never part of the original HTML specification. Many attempts were made to introduce better controls into browsers and the HTML language, but most of these additions fell short for four reasons:

  1. They were either browser or vendor specific solutions to a specific problem
  2. They did not integrate mainstream developments in XML Schema, XPath and CSS
  3. They did not take into account the need for clear separation-of-concerns
  4. They did not meet the rigorous needs of application architects that understood the benefits of MVC architectures

As a result, many of these point-solutions have been discarded or have seen only niche use by some vendors.

Around 1997 the W3C started to address the concerns of these users and studied how web forms could be processed in a better way. They realized that validating data elements was a large concern and that re-inventing the validation tools already present in XML Schema would only duplicate efforts.

The first XForms draft specification was published on April 6, 2000. Since then it has been revised with the most recent version (1.1) appearing in March of 2006.

Today the XForms standard addresses several web forms development issues:

  1. Model-View-Binding architecture
  2. Advanced functionality
  3. Precise specification for all browsers to integrate
  4. Extensibility without resorting to JavaScript programming
  5. Built-in assumptions about how form elements get updated

The Dependency Graph

edit

Embedded within every XForms application is the ability to automatically recalculate values when a form element changes. If you have a complex form with calculation rules then this feature becomes critical for avoiding writing manual recalculation code. Most JavaScript forms libraries require the author to specify not only form rules, the order these rules must be executed. This slow and painful form-author-specified recalculation order is replaced in XForms by an automated method to determine the order of recalculation.

The way XForms applications do this is by doing automated determination of recalculation order based on optimal graph algorithms.

One of the most important papers about how XForms is designed come from the following paper:

The XForms Computation Engine: Rationale, Theory and Implementation Experience html version

If you have a simple form with just a few elements and no calculation rules, HTML forms might be a good solution for you. If you have forms with rules such as sum and total calculations in a purchase order, then XForms might be the ideal fit for your web form.

For the current working draft of the XForms specification you can go to the w3 web site:

W3C Candidate Recommendation 29 November 2007

Next Page: Benefits | Previous Page: Introduction
Home: XForms