Databases Reference
In-Depth Information
9.4
Case study: using XRX to manage complex forms
This case study will look at how zero translation can be used to store complex form
data. We'll look at the characteristics of complex forms, how XForms works, and how
the XRX web application architecture uses a document store to allow nonprogram-
mers to build and maintain these form applications.
XRX stands for the three standards that are used to build web form-based applica-
tions. The first X stands for XForms ; the R stands for REST , and the final X stands for
XQuery , the W3C server-side functional programming language we introduced you to
in chapter 5.
9.4.1
What are complex business forms?
If you've built HTML form applications, you know that building simple forms like a
login page or registration form is simple and straightforward. Generally, simple forms
have a few fields, a selection list, and a Save button, all of which can be built using a
handful of HTML tags.
This case study looks at a complex class of forms that need more than simple
HTML elements. These complex forms are similar to those you'll find in a large com-
pany or perhaps a shopping cart form on a retail website.
If you can store your form data in a single row within an RDBMS table, then you
might not have a complex business application as defined here. Using simple HTML
and a SQL INSERT statement may be the best solution for your problem. But our expe-
rience is that there's a large class of business forms that go beyond what HTML forms
can do.
Complex business forms have complex data and also have complex user interfaces.
They share some of the following characteristics:
Repeating elements —Conditionally adding two or more items to a form. For
example, when you enter a person they may have multiple phone numbers,
interests, or skills.
Conditional views —Conditionally enabling a region of a form based on how the
user fills out various fields. For example, the question “Are you pregnant?”
should be disabled if a patient's gender is male.
Cascading selection —Changing one selection list based on the value of another
list. For example, if you select a country code, a list of state or province codes
will appear for that country.
Field-by-field validation —Business rules check the values of each field and give
the user immediate feedback.
Context help —Fields have help and hint text to guide users through the selection
process.
Role-based contextualization —Each role in an organization might see a slightly dif-
ferent version of the form. For example, only users with a role of Publisher
might see an Approve for Publishing button.
Search WWH ::




Custom Search