20

XForms was and/or is an XML markup that supports structured form data. It is a standard evolved from XML and was designed to be easily integrated into other current markup languages such as XHTML, ODF or SVG, or any "suitable markup language" as well as offer multi-platform and multi-browser support. More project goals are declared on the Working Group page I've linked below.

As I was doing research for handling forms with php, I noticed the PHP Features page offers support for handling XForms in php, but alas I did not know what XForms was, so the search began.

From the XForms Working Group page at the W3C website (the people who make the web standards) it's written that "The Forms Working Group was officially closed on 2015-04-08". It also says work may continue through the XForms user community group, but the users community group hasn't been officially posted on since October of 2015, except for that of people inquiring about the continuation of XForms.

The group seemed to have been working on a version 2.0 of XForms but it seems that it was never released since the W3C Standards page shows version 2.0 as a draft since August of 2012, and version 1.1 being the latest version which released in 2009. This is also linked below.

To better understand what alternatives might replace XForms, from the XForms page at the W3C website it is stated that the primary difference between XForms and HTML forms, apart from XForms being in XML, "is the separation of the data being collected from the markup of the controls collecting the individual values". So, as an example on the XForms page, instead of hardcoding HTML into the form to render a specific way, the XForms schema is used, and the device, browser or application detects the data type in the form and renders the data as appropriate for the platform, such as form data input types 'select', 'input', 'secret', 'upload' and others that the XForms team has defined.

Does anyone know if there is still work continuing on XForms or is it a dead or to-be-dead standard to be outdated and replaced by future software?

Also, does anyone know of any alternatives that have been put into place, or are being developed to replace XForms and software of the like?

Thanks for helping. I'm nowhere near an expert on XForms or its uses so if I've given any misinformation please correct me. Also, I cannot post more than 2 links in this post so I will leave the other related links in the comments.

EDIT: I also felt that the similar question asked in 2011 on this topic was outdated and not equipped to find software alternatives in the community.

Similar Post: Is XForms still a live standard?

PHP Features: http://php.net/manual/en/features.php

W3 XForms 2.0 Draft: https://www.w3.org/TR/xforms20/

Community
  • 1
  • 1
Devin Carpenter
  • 907
  • 8
  • 21

4 Answers4

30

Background

I am writing as a former XForms Working Group member, and current XForms Community Group member (see below). The following is a personal opinion.

Status of XForms and XForms 2.0

A lot of information regarding XForms on the W3C site is obsolete, so I wouldn't take everything (if anything at all) you read there as gospel, but it is correct that W3C closed the XForms Working Group (and they did so with quite a bit of disrespect, I might add).

The group had been uncharted for a while, was hoping for a recharter, but that didn't happen. I should say that any XML activity at W3C is very low-priority for the organization at this point, even for the relatively more successful technologies like XSLT and XQuery.

However there is, as of 2016 2019, continued work on XForms 2.0 in the context of the XForms community group. This is a small group, which although hosted by W3C is not an official W3C Working Group. Anybody can join that group. We hold weekly calls and hope to complete the XForms 2.0 specification this year. You can find the current draft specification here:

Once the specification is done, if there is interest, a new Working Group might be recharted, but that is not a given. This would be a necessary path to make XForms 2.0 an official W3C Recommendation.

If that doesn't happen, then the XForms 2.0 draft will still be there for anybody to look at and implement. It doesn't have the force of a Recommendation but that force has always been very relative anyway.

What sets XForms apart?

The following is not complete but these are some of the top aspects which, I think, set XForms apart:

  • being a specification rather than an implementation
  • using XML for the data model and other XML-related specifications
  • focusing on forms (rather than full-fledged app development)
  • separating control appearance from implementation
  • providing a spreadsheet-like model of data dependencies
  • being in general very declarative in nature, including making hints, help, and alert native concepts

In addition, XPath 2.0/3.x makes for a surprisingly flexible language to bind properties, calculations, and controls to data models. I think that it is hard to beat at this point.

Current XForms implementations

There are a few current implementations of XForms out there, including XSLTForms and Orbeon Forms (which I work on).

While back in the early 2000s the avowed goal was for XForms to eventually replace HTML forms, and in this perspective browser plugins and the Firefox implementation were developed, that idea has not been current for a very long time.

For years now, XForms hasn't depended on native browser support at all. All of XForms can be implemented in pure JavaScript, or with a combination of client/server parts, or within native applications.

Alternatives to XForms

I am not aware of any close alternatives to XForms based on the points listed above.

The elephant in the room is that XForms is based on the XML stack of technologies, and there is evidence that XML is no longer taking the world by storm (that is an understatement). But XML is still widely used in many contexts, and that's something to keep in mind.

If you deal with XML data, or at least don't mind XML, XForms remains a modern solution in 2016 2019. You might look into existing implementations or into implementing your own (although that is not exactly trivial).

If you do not care about XML at all, or dislike it strongly, then XForms is not a great solution (at least until it provides support for additional data models and binding languages, like JSON / JavaScript). UPDATE: XForms 2.0 has some level of JSON support. Picking one of the current UI frameworks will be the way to go, but they still fall short in many ways.

There are lots of UI frameworks using various underlying technologies (JavaScript being probably number one here, but you can count also TypeScript, Elm, Scala, and more) which are in constant evolution. These can be considered alternatives in that they allow you to build user interfaces and complex forms. Some frameworks have really good support for things like dependencies, some focus on providing nice UI controls, some on the UI update model, etc.

But I have not yet found a framework which covers all the bases as nicely as XForms does, although there is nothing that prevents that from happening in the future.

ebruchez
  • 7,760
  • 6
  • 29
  • 41
13

The fact that work stops on development of a standard does not mean the standard is dead, it means it is stable. For example, there is no active work on developing XML itself, which basically means that there is consensus that the standard in its current form meets its requirements. Probably more standards would benefit if people recognized when it was time to stop adding bells and whistles.

XForms is one of those standards that has been very successfully deployed by an innovative minority of users but has, for some reason, never caught on with the masses. It is certainly not a dead standard. It's a shame that it's not natively supported by the browsers but there are good client-side and server-side implementations available, and many users who will attest to the productivity benefits it brings over hand-coding the same stuff in Javascript.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164
  • 1
    I understand that there are development projects that have achieved what goals they have set out to pursue, and that is good enough for the developers, besides minor bug fixes of course, but the curious part about XForms in particular to me is that they were working on a version 2.0 with set goals to make it better, but then the working group disbanded, and the work that they had set out to achieve was never accomplished. So the project status was left in limbo, effectively turning off any potential developers from wanting to implement XForms in future projects due to discontinued support. – Devin Carpenter Oct 30 '16 at 09:12
  • I don't know the particular circumstances for XForms, but it's common for working groups to find themselves short of resources to achieve what they wanted to do; it's also common, for example, to find that the enthusiasts putting the work into advancing the standard have become disconnected from the vendors and users of the standard; some of those vendors and users may fundamentally disagree about the direction the work is taking. Failure to deliver version 2.0 of a standard doesn't say anything about whether or not there are benefits to be obtained from using version 1.0. – Michael Kay Oct 31 '16 at 08:36
  • @Sorrow123444 I added another answer with more details about the status of XForms 2.0. I hope that will help! – ebruchez Oct 31 '16 at 18:59
  • This was a while ago but I think the idea is timeless. If what @Michael Kay says of XForms: "XForm (=1.x) Mission Accomplished", then the world can universally adopt it. The opposite is the case with the rest of the X~ technologies (XSLT,XPATH,XQUERY) racing now towards 4, leaving a trail of non-universal niche capabilities Versions [1-3].[0-9] sans universality. Should W3 not be encouraging a universal use of the technology by merging them into one compatible numberless version so the world public can thereafter use a universal variant, a step behind bleeding edge sans niche dev-license? – MKhomo Sep 28 '21 at 07:21
  • @MKhomo The world will always move forwards in fits and starts, dictated by changing fashions and factions, and the opposing forces of innovation vs stability. It's an organic and uncontrolled process, not something that a body like W3C can manage centrally from the top. In any case, W3C efforts are all volunteer-driven, it goes where the members take it. You have to swim with the tide. – Michael Kay Sep 28 '21 at 11:11
  • I suppose it boils down to social dynamics. It would be nice to gauge or track the evolution of innovations through those fits and starts. Looking from the outside there are champion swimmers with a pull to form their own tides and sportif's who surf the breaking swells just for entertainment; and lastly, the casual hobbyists in the shallows who flee at every flow and almost wash away with every ebb unless like sand crabs, dig in for 'context' preservation and dig out only to find it a different world yet again... (Maybe a reflective title like - from The Trials of Troff to say, ... is due? ;) – MKhomo Sep 28 '21 at 15:31
7

Writing as the long-time chair of the XForms groups, I don't need to add much more to what Erik has already said about the working group and the specification.

However it is worth saying a little about how it is being used, and some of the advantages, since when you are using a website, you can never tell that it is using XForms.

There is no way to tell when a company is using XForms, so the only ones I know about are when someone in the organisation mentions it to me. Some of the ones I have heard about are:

Several Dutch Government departments, several UK government departments, the USA Dept of Motor Vehicles, the British National Health Service, the BBC, the Dutch weather service, the Dutch land registry, the British insurance industry, EMC, NASA, CMC, US Navy, German shipbuilders, Xerox, Yahoo. The list is very long.

There are some nice stories too. A recent one is from the British National Health Service, which started a project for a health records system:

  • It involved 70 people
  • It cost £10M.
  • The hardware costs alone were £5 per patient.
  • It failed.

One single person then created a replacement system using XForms:

  • Hardware costs are 1p per patient
  • It runs on Raspberry Pi's
  • It is now running in 5 NHS hospitals.

There are many other examples of XForms saving huge sums of money.

There are many active implementations, including:

  • CM Pro (Netherlands),
  • Inventive Designers (Belgium),
  • BetterForm* (Germany),
  • XSLTForms* (France),
  • Jadu (UK),
  • Orbeon* (USA),
  • Enketo (USA).

XForms is also part of OpenOffice* and LibreOffice*

*=open source

We have a yearly XForms Day in Amsterdam. The next one will be in May. I will be publishing the details on my home page, which you can find by Googling my name.

Steven Pemberton

5

If you're looking for working software, these tools are mature XForms implementations with broad support by their creators and/or the community:

  • XSLTForms: Javascript plugin for any browser with XML and JavaScript support
  • betterFORM: Server side solution based on Java. Integrated in eXist-db
  • Orbeon Forms: Commercial solution with an Open Source version
  • Enketo: is the XForms engine included in Open Data Kit, it has some differences with XForms standard.
Bill Velasquez
  • 875
  • 4
  • 9