XForms |
XForms is an XML format for the specification of user interfaces, specifically web forms. XForms was designed to be the next generation of HTML / XHTML forms, but is generic enough that it can also be used in a standalone manner to describe any user interface, and even perform simple and common Data manipulation tasks.
XForms, much like XHTML 2.0 which is currently under development as of July 2005 and within which XForms will be embedded, differs from previous versions of XHTML. Because of this there is a learning curve for old time developers, but because XForms in general provides a large time savings for the development of enterprise quality web forms, it can be an attractive alternative for many uses.
XForms 1.0 has been made an official W3C W3C Recommendation in October 2003. An indispensable errata to the 1.0 specification is available, the latest version of which dates from July 2005. The XForms Working Group has announced that a second edition of the XForms 1.0 specification was in the works. XForms 1.1, which introduces a few improvements and clarifies a few ambigious specifications, is under review as of July 2005.
=Differences from HTML forms=
Unlike the original HTML forms, the creators of XForms have designed XForms to separate control, content, and presentation resulting in a section which describes submission actions, what data the forms apply to, and constraints upon that data, a section which describe what controls appear in the form and how they are grouped together, and various Cascading Style Sheets elements that describe various aspects of the forms appearance (this division is often described as the MVC pattern). An XForms document can be as simple to create as a legacy HTML form (by only specifying the submission element in the model section, and placing the controls in the body), but XForms includes many advanced features. In particular, the user can bind data to an xml file, validate against XML schema data types, require certain data, disable input controls depending on circumstances, change sections of the form depending on circumstances, enforce relations amongst entries, input variable length arrays of data, output entries and quantities derived from entries, prefill entries using an xml file, respond to actions in real time (versus at submission time), and modify the style of each control depending on the device they are displayed on (browser versus mobile versus text only, etc.). There is no need for any scripting.
Like legacy forms, XForms can use various non-XML submission protocols (multipart/form-data, multipart/x-www-url-form-encoded), but a new feature is that XForms can send data to a server in XML format. XML documents can also be used to prefill data in the form. Because XML is a standard, many tools exist that can chop and modify data upon submission, unlike the case with legacy forms where in general the data needs to be parsed and manipulated on a case by case manner (although most programming languages eventually obtained library functions that does the parsing, it is not always simple to find and use these libraries). XForms is itself an XML dialect, and therefore can create and be created from other XML documents using XSL Transformations. Two examples where there is useful are 1). XForms can be automatically created from XML Schemas, and 2). XForms can be converted to legacy XHTML forms: this is basically how server side XForms work today!
=Software support=
At the time of this writing no widely used announced a beta release of the XForms 1.0 recommendation. For IE6 there is [http://www.formsPlayer.com formsPlayer], which extends the browser to include not only support for the full XForms standard, but also provides DOM 2 Events, DOM 3 XPath, XML Events and the DOM 3 Implementation Registry.
The new FormFaces variant is a pure JavaScript solution. This means that XForms+HTML can be sent directly to the browser where JavaScript transcodes the XForms controls to HTML form controls and processes the binding directly within the browser. The FormFacesTM JavaScript is compatible with browsers that implement XHTML 1.0, ECMA-262 3rd Edition, and DOM Level 2 which includes Internet Explorer, Netscape, Mozilla, Firefox, Opera, Konquerer, Safari, and NetFront.
OpenOffice.org versions 2.0 and greater support XForms[http://www.openoffice.org/press/2.0/#20].
XForms can also be used today through various server-side s. The advantage to the open source server technologies is that the resulting output works in theory with almost any browser existing today (the end user will not necessarily notice that they are viewing an XForms page). The advantage to plug-ins and Flash XForms technology is that these implementations, because they integrate themselves into the browser, will work with exising server architectures, can be more responsive, require fewer server fetches, and can present themselves in more exciting ways (i.e. controls that do not already exist in the browser, like sliding scales, can be added to a page). The trade-off on both sides is that new software is needed; either each client must install the required plug-in, or the server architecture must change to accommodate a UI proxy. A good solution might mix both of these solutions, for instance testing the browser for Flash and serving a glitzy version for those users, but defaulting to a server solution for other users.
=XForms for Mobile Devices=
==Benefits==
XForms provides specific benefits when used on mobile devices:
==Implementations==
Despite the benefits of XForms for mobile devices, XForms on mobile devices is still an emerging technology at best. Jon S. von Tetzchner, CEO of Opera, producers of the leading browser for mobile devices, says his company is currently considering support for XForms but that in his mind Webforms 2.0 makes more sense on the client side. So far, IBM, Oracle and FormFaces have produced significant initiatives:
=See also=
*List of user interface markup languages *Comparison of user interface markup languages
=References=
=External links=
|
|
