XForms on the Intranet

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.


Quakr is a project to build a 3-dimensional world from user contributed photos, a.k.a. some friends having fun with geek hacking. I see they submitted an abstract to XTech too. The blog links to some interesting experiments mashing up Google Maps with a Flash and VRML viewer.
The Quakr 7D Tiltometer is worth viewing too if only for its sheer Blue Peter stylee “build this at home” excellence.

Five Things

The “five things” meme is still doing the rounds and it turns out I’ve been tagged by Phil Wilson. So here’s five things that you almost certainly don’t know about me:

  • My wife and I got together at University after a Rag 3-legged pub crawl. Yes, my charm is so bad that tieing myself to a lady with a skipping rope and plying her with beer for an evening is the best I can do. We’re still together 14 years though. Yes, I’ve untied her since
  • I once went to a hen night in Valverde del Camino in Huelva.
  • I have a degree in Biology and for my final year project I somehow ended up studying the egg laying behaviour of Callosobruchus maculatus. This involved sitting in a small, dark, hot room (35 degrees centigrade) which had no windows, watching six female beetles recording what they were doing every thirty seconds over a period of two hours. This was repeated 30 times. What I’d wanted to do was study gorilla behaviour.
  • I suffer from vertigo and am mildly claustrophobic (the latter not connected with the former, but it didn’t help much either)
  • The first ever database schema (OK, record format) I designed was on my first computer. It was an inventory system for my dad’s pigeon lofts

I’ll try tagging Geoff, Pete, Kirsty, Dorothea, and iand to spread things around a little further (and in some different directions!).

XML Hypertext: Not Dead, Merely Resting?

“The dreams of XML hypertext are dead, or at least thoroughly dormant”

Simon St Laurent’s XML.com article on XQuery is an interesting read. But I think the above statement is worth discussing. Is XML hypertext really dead? Or, if its dormant, is it going to remain so?
Firstly what is XML hypertext? I presume from the context of the quote that Simon is referring to client side use of XML on the web. To me this incorporates several use cases including both the use of XML for presentation (XHTML, SVG, etc) and for data publishing (RSS, Atom, XML based web services). There is an obvious need for linking in both of these use cases.
Where I’d agree with St. Laurent is that most of the existing work here is dormant or duplicated. For example while SVG makes use of XLink, its not used in RSS and Atom, and was deemed not flexible enough for use in XHTML due to issues with attribute naming. However the basic model, labelled links with activation indicators (onLoad, onClick, etc) seems to be shared across vocabularies. But still, XLink has been a Recommendation since 2001 and has yet to set the world on fire.
However where I’d disagree with Simon is that XLink or XML hypertext is thoroughly dormant. Much as I hate to make predictions, I think we’re only just gaining any appreciation of the power of producing good hypertext, because we’re only now seeing the large scale publishing of machine-processable, interrelated data that makes linking worthwhile.
I think growing appreciation of the REST architecture is driving a greater understanding of the benefits of highly linked resources. Sure, we all know its good practice to avoid making web pages that are “dead ends”, but not everyone is publishing data to the same guidelines. The principle of “Hypermedia as the engine of application state” is still not widely understood; it’s a piece of REST Zen that benefits from practical implementation.
Hypertext simplifies client-side development as it avoids spreading the requirement that the client must know how to construct URIs: this reduces coupling. It also simplifies client logic as “the navigation options” (i.e. state transfers) can be presented by the server as the result of previous interactions; the client can simply select from amongst the labelled options. For example if the client needs to access some specific data, e.g. a list of my recently published photos, it can select the appropriate link to retrieve (assuming its available).
That link may be to an entirely different service.
In an XTech 2005 paper I tried to argue (I suspect not very clearly) that linking offers the best route to integration of data from multiple web services. Linking as a means to easier mashing.
If the current data publishing trends continue then I suspect there’s going to be a growing understanding of the benefits of hypertext and this inevitably drive some renewed interest in XLink or a related technology.
What I personally like about RDF in this regard is the “closure” it offers: every resource has a URI, every schema has a URI, every Property and Class has a URI so the data, metadata and schemas can be linked together, and this offers some very powerful capabilities.