2 XForms Getting Started
This chapter briefly describes XForms, but not all of the features of XForms is not described. For XForms Complete Description, please refer to subsequent documents. The following section provides a complete instance of the XForms application embedded in the XHTML document, instance in E.1 XForms in XHTML.
2.1 Separate the purpose or intent from the expression
A typical form is integrated with the integration of the data set, intended by creating an interactive expression instantiation that allows the user to provide the required information, and completes the form return result data.
intention
Expression
data
Data collection
Form control
registration message
Work time list
Collect user interface for working hours
Work days, hours
Shopping application
Shopping user interface
Order, transportation, payment information
Information Collection
WWW page integration form interface
User contact information
The HTML form cannot be separated from the expression, and only limited data captured by the form, the main advantages of XForms are listed below:
Stronger input
Submitted data is verified by code authentication, valid data automatically generated by the input verification rule, will help client authentication.
Existing architecture reuse
Using the XForms application can eliminate a copy and ensure that the update verification rules caused by changes within the business logic definition can not need to recreate the verification rules.
External architecture added
The XForms creator can provide additional constraints outside the basic constraint collection and as part of the XForms model while enhancing the global availability of the Web application results.
XML submission
The demand for custom server-side logic will be eliminated for the conversion of data, and the received XML instance document can be authenticated and processed directly by the application backend.
globalization
Apply an instance of XML 1.0 to ensure that the submitted data is international.
Enhanced availability
XForms separation content and expression, the user interface control encapsulates all relevant media data (such as: label), will enhance the availability of different form applications. XForms User Interface Controls are general, stand-alone.
Multi-device support
Advanced User Interface Controls and intention-based user interface creation makes users interact between different devices.
Announced event handle
Different from the current use of interactive scripts, multi-XForms documentation can be static by defining XML-based published event handles (such as: setfocus, message, and setvalue) suitable for general transactions.
2.2 Current Method: HTML
Assuming a simple HTML-based S e-commerce form is created as follows:
Example: HTML form
hEAD>