Making the Switch to XForms

From a technology perspective, XForms makes a clean break with HTML forms. The reality, though, is that, as of 2002, nearly every Web site is using HTML forms or, more precisely, is expecting visiting browsers to be equipped to handle HTML forms and JavaScript. Given the slow rate at which new technologies reach average users, it will likely be several years before Web designers can safely rely on XForms being present as a standard feature of visiting browsers. This section contains some pointers on how to make a smooth transition to XForms technology.

Client-Side and Server-Side XForms

HTML forms were defined such that the only reasonable way to implement the technology was in a client-side browser. XForms, on the other hand, defines things such as validation rules and declarative actions, which can be processed on either a client or a server. This gives a lot of flexibility in the architecture of an XForms engine and, in many cases, allows XForms to be layered on top of existing browser technologies.

One common strategy for XForms engines is to divide processing between the client and server. The dividing line between client and server can be in several different places:

The Featherweight Client

The client side requires almost no intelligence, serving only as a viewer application, while the server handles all of the logic and processing. Frequent server round trips are needed in order to coordinate the display with the internal state of the engine. The open ...

Get XForms Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.