XForms: What and Why

Steven Pemberton, CWI, Amsterdam and W3C
Chair, W3C HTML and Forms Working Groups

HTML Forms: A great success!

The basis of the e-commerce revolution!

What do we use forms for?

Searching

Google

Buying

Amazon

Logging in

Yahoo

Configuring hardware

Linksys router

Reading mail

Reading mail

Composing email

Composing email

Etc etc

So why XForms

After a decade of experience with HTML Forms, we now know more about what we need and how to achieve it

So what's wrong with HTML Forms?

So what does XForms do to change all this?

The central ideas of XForms are that:

XForms improves the user experience

XForms has been designed to allow much to be checked by the browser, such as

This reduces the need for round trips to the server or for extensive script-based solutions, and improves the user experience by giving immediate feedback on what is being filled in.

It is easier to author and maintain complicated forms

Because XForms uses declarative markup to declare properties of values, and to build relationships between values, it is much easier for the author to create complicated, adaptive forms, and doesn't rely on scripting.

An HTML Form converted to XForms looks pretty much the same, but when you start to build forms that HTML wasn't designed for, XForms becomes much simpler.

It supports common use cases

Repeating structures

Wizards

Multiple submission

It is XML, and it can submit XML

XForms is properly integrated into XML: it is in XML, the data it collects in the form is XML, it can load external XML documents as initial data, and can submit the results as XML.

By including the user in the XML pipeline, it at last means you can have end-to-end XML, right up to the user's desktop.

However, it still supports 'legacy' servers.

XForms is also a part of XHTML2

It combines existing XML technologies

Rather than reinventing the wheel, XForms uses a number of existing XML technologies, such as

This has a dual benefit:

Tries to remain recognisable for HTML community

It integrates into existing data streams

Data can be pre-loaded into a form from external sources

Existing Schemas can be used

It integrates with SOAP and XML RPC

Doesn't require new server infrastructure

It is device independent

Thanks to the intent-based controls, the same form can be delivered without change to a traditional browser, a PDA, a mobile phone, a voice browser, and even some more exotic emerging clients such as an Instant Messenger.

This greatly eases providing forms to a wide audience, since forms only need to be authored once.

It is internationalized

Because the data submitted is XML, it is properly internationalised.

It is accessible

XForms has been designed so that it will work as well with accessible technologies (for instance for blind users) as with traditional visual browsers.

It is royalty-free and unencumbered

Open standard

Wide industry support

Widely implemented

(If you think this is a good idea, join W3C and support our efforts!)

Conclusions

It looks like it is going to be the year of XForms

XForms has hit a nerve, and is supplying a need: industry reponse has been incredible.

More information: www.w3.org/Markup/Forms