Elliotte Harold has published a nice introduction to XForms in Firefox on IBM developerWorks. In the conclusion he notes that:
Client-side XForms processing won’t be possible for public-facing sites until XForms is more widely deployed in browsers. However, that doesn’t mean you can’t deploy it on your intranet today. If you’re already using Firefox (and if you aren’t, you should be), all that’s required is a simple plug-in. After that’s installed, you can take full advantage of XForms’ power, speed, and flexibility.
I’d agree with this whole-heartedly. I wrote and deployed a little XForms application just before Christmas and it was a very painless exercise indeed.
Over the past few years we’ve rolled out an number of RESTful XML based APIs internally. We’ve also toyed with different ways to build tools to manage systems using these APIs, including using Java Swing desktop tools, simple HTML forms, etc. Mainly we’ve been trying for a while to find a sweet spot between ease of implementation and a reasonably good user experience.
Recently I’d been toying with a Javascript library to one of our REST interfaces based around the Prototype library. It was fun if occasionally frustrating banging my head against Javascript. However it wasn’t finished and I needed to quickly roll out some forms for managing some key data. So I took another look at XForms. I’d researched it a few years ago and had rejected it because of the lack of browser support and the different ways that the plugins required you to deploy the forms.
As almost everyone internal has gravitated towards Firefox cross-browser support isn’t a strong requirement so I went ahead and built the system using XForms. It was a very satisfying experience: the syntax is easy to get to grips with, and its possible to create some fairly slick AJAX style forms with a minimum of fuss. And more fun that messing with Javascript.
So for us at least XForms does seem to hit a sweet spot for rapid tools development, particularly as we already have a lot of existing XML interfaces. In fact the exercise highlighted a few flaws in our interfaces (e.g. delivering correct mime types, under use of “hypermedia” to link between resources in some areas) so was a good learning exercise in its own right.
It would be nice to see some slicker custom controls for different data types though. I think AJAX and client-side scripting still corners the market on slick dynamic UIs, and will do for some time. But for sheer ease of use, and getting things done, XForms gets the thumbs up from me.