XForms Demystified: What Is It?
For any visual interface to be truly abstract, it must separately address the data layer, the presentation layer, and the logic layer of the application. Conforming to this notion, XForms divides the process of development of the form into four separate entities:
XForms model or form description (purpose of the form).XForms models are device-independent XML form definitions that allow a system to use these definitions along with different standard or proprietary presentation options such as XHML, XForms user interface, WML, and so on. XForms build on the XML schema-based datatype definitions, which lay the basis for distinguishing between floats, integers, dates, times, and so on, as well as rules (such rules as "a <Company> must have at least one <Contact> node"). It uses Xpath expressions for evaluating the calculated values in the form (just like the formulas in a spreadsheet). The XForms model provides the means for the system to understand what the data "means."
XForms instance data. This is an internal representation of the data that's bound to a form control. Every form has an associated state that represents the values entered at any particular point in time, or the default values. The XForms processor maintains an internal XML data tree representative of this state for each xforms element defined in the XForms model. This instance data conforms to the XPath data model. Additionally, each node in the XML tree contains a Boolean flag that allows the processor to inform the presentation layer to update the display if the value of the element changes. This allows the forms to support features such as workflow, auto-fill, and pre-fill of the forms.
XForms user interface or form presentation. The XForms UI is defined using form controls. A form control describes the functional aspects of the underlying control; its presentational aspects (such as using class attributes in a CSS); and behavior of the control using XForms action elements. The separation of the presentation of a form allows people with a set of different skills to design the look and feel of the form as a part of the design process. In XForms, data values are not bound to a particular interface representation. The "purpose" or the XForms model of a form control may be the same on various devices. However, how the control is rendered visually is based on capabilities of the platform.
XForms submit protocol. This describes the method of flow of instance data to and from the XForms processor. It lays down the rules for how XForms submit and receive the data and also provides for the ability to suspend and resume the processing of a form.