XForms

Although I haven’t been writing much about programming and computers lately, I have still been reading.

XForms is another thing, like Mono, that I found out about quite a while ago that has recently resurfaced as possibly useful. XForms is a whole rethink about how information should be collected and sent of the web. The keyword here is information. HTML forms don’t really send information, they send data. There is no real structure to what is sent - all you have is name/value pairs (although depending on the capabilities of the server you can at least send variable length arrays with the foo[] naming convention).

XForms improves on this by separating forms into different parts, primarily models and user interface (well technically what I’m referring to as models is split into abstract models and instances but that’s like talking about classes and objects). The models are just chunks of XML that are sent to the page. The user interface (essentially just input tags like the HTML equivalents) modifies this XML and then sends it back.

The structuring of the data may well be enough to warrant the adoption of XForms, but it’s a little better than that. When I say the XML (or more correctly the model) is modified by the user interface, the modifications are held in memory by the client (probably a browser) and any references to the model should change accordingly. This allows some stuff that would usually require clever AJAX, complete calls to the server or at least just plain JavaScript can be done fairly trivially.

There are a lot more possibilities, this really is just the tip of the iceberg. To find out more, search for XForms :P

There is a problem though, support in browsers. You can get a plugin for IE6 that handles XForms but requires the page include the plugin. You can get an extension for Firefox that handles it “natively”. Neither work that well and when I tried it neither worked properly with a page intended for the other (IE obviously couldn’t use a page without the plugin and the plugin stopped the XForms working for Firefox). But the same was true (if not worse) for JavaScript when it first came out.