Home > Articles > Web Services > XML

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

1.4 Summary of XForms Benefits

We conclude this chapter with a summary of XForms features and highlight the consequent benefits over using traditional HTML forms for developing Web applications. A key differentiator when using XForms is the separation of purpose from presentation. The purpose of the questionnaire application is to collect information about the user. This is realized by creating a presentation that allows the user to provide the required information. Web applications typically render such a presentation as an interactive document that is continuously updated during user interaction. By separating the purpose from its presentation, XForms enables the binding of different interactions to a single model. In practice, this enables the application developer to deploy user interfaces that are appropriate to the target audience without having to create custom software components for processing the data collected via each distinct user interaction. Finally, by using structured XML to collect, validate, and communicate data, XForms processors can provide these functions to the Web developer as part of a standard XForms service.

1.4.1 XForms Features

Declarative

Declarative authoring makes XForms applications easier to maintain.

Strong typing

Submitted data is strongly typed and can be checked using off-the-shelf XML Schema tools. Strong typing also enables automatic client-side validation. As an example, a native XForms browser can use these types of constraints for validating user input; when serving the same XForms document to a legacy browser, these constraints can be used to generate client-side Javascript automatically.

Schema reuse

XForms enables the developer to reuse business rules encapsulated in XML Schemas. This obviates duplication and ensures that a change in the underlying business logic does not require reauthoring validation constraints at multiple layers of the Web application.

Schema augmentation

This enables the XForms author to go beyond the basic set of constraints available from the underlying business application. Providing such additional constraints as part of the XForms Model enhances the overall usability of the resulting Web application.

XML submission

This obviates the need for custom server-side logic to marshal the submitted data to the business application.

Internationalization

Using XML 1.0 for serializing data ensures that the submitted data is internationalization ready.

Accessibility

User interface controls encapsulate all relevant metadata such as labels, thereby enhancing accessibility of the application when using different modalities; as an example, a nonvisual client can speak relevant information when navigating through an XForms user interface.

Device independence

Abstract user interface controls lead to intent-based authoring of the user interface; this makes it possible to deliver the XForms application to different devices. Thus, Web pages authored using XForms can be deployed to a range of accessing devices including desktop browsers, PDAs, and cell phones with small displays.

Localization

Labels and help text can be referenced via URIs, thereby making it possible to localize XForms user interfaces.

Actions

XForms defines declarative XML event handlers such as 〈setfocus〉 and 〈setvalue〉 to obviate the most common use of scripting in Web applications. Consequently, most XForms applications can be statically analyzed; contrast this with the use of imperative scripts for event handlers.

  • + Share This
  • 🔖 Save To Your Account