As the W3C puts it, XForms is the next generation of web forms. It aims at replacing HTML forms within XHTML, as well as providing other languages such as SVG the ability to handle forms.
XForms was largely intended by its authors to run on the client, that is, within a web browser, as HTML forms do today. It offers benefits such as:
- Clear separation between the data captured and the presentation (separation of concerns).
- Flexible, structured XML-based data model. Define your data model as an XML document, then create forms accessing the data.
- Built-in facilities for validation and data integrity based on XML Schema and/or assertions.
- Requires much less, or no scripting at all for many common scenarios that do require scripting with HTML forms. In other words, XForms's approach is very declarative.
- Ease of internationalization.
- Support for a variety of devices.
As we know, after Netscape succumbed to Internet Explorer back in the 90s, client-side web browser technologies have largely stalled. The theory is that Microsoft, with a market share of over 90% of the installed web browsers base, does not see any point in making any improvement at all. After IE 5, Internet Explorer hasn't had any serious upgrade. With that spirit, Microsoft has said it wouldn't support XForms. In fact, Microsoft has also its own competing proprietary technology to push: InfoPath.
The good news is that while all this has been going on, the Mozilla project has not rested on its laurels and has produced an ever more solid browser, culminating with the release of Firefox 1.0 just a few months ago, a milestone on the path to a much bigger market share.
The Mozilla XForms beta is important, because it announces the day where Firefox will be fully XForms 1.0 compliant. Developers can play with a beta and get their hands on the technology. You can look forward to the day where XForms-based applications can at last be freely deployed on the intranet, where the browser environment is controlled.
But there is still a major issue, which is that if Microsoft doesn't come back on its decision not to implement XForms, it still won't be possible to deploy XForms on the web - that is, unless you don't care about users being able to access your site or web application. As much as we like to see Firefox's market share grow, it has yet to reach 10%.
This is why it is important today to closely look at server-side XForms implementations, one of which is provided by the open source Orbeon PresentationServer today.
The huge benefit of this approach is that almost every browser currently deployed can now render XForms, while the application developer does in fact write XHTML and XForms. It also opens the possibility for XForms-enabled web browsers to fully benefit from XForms, while legacy browsers use the server-side implementation.
To be fair, there are some drawbacks. For example, a promise of XForms is to reduce the number of roundtrips to the server. With a server-side implementation, this may not be easily achieved. Also, some features of XForms may take time to be implemented by such server-side implementations because they are harder to implement than on the client-side. PresentationServer aims at implementing eventually all of the XForms specification. The list of implemented features is available here.
In spites of those drawbacks, this approach is in some people's opinion the only way XForms will be able to be widely deployed on the web in the fairly short-term future. So go ahead and give PresentationServer a try!