Re: XForms VS HTML 5 forms


> We are planning to build a web forms designer that support building of
> survey complex forms. We are comparing XFroms and HTML5 Froms. Which is the
> best forms format to use that can support the following:

I think you are asking a hard question. A few comments:

1. There is HTML forms and XForms as abstract specifications, and then
HTML forms and XForms as available implementations. Clearly, by a very
long shot, HTML forms implementations are more widespread (any web
browser supports them). XForms on the other hand has a small number of

2. I work on a form runtime and designer (Orbeon Forms / Orbeon Forms
Builder, see, and we chose, years ago, XForms
as underlying the format to represent the forms. This made sense (and
still does) because XForms is more rich, declarative, and based on a
MVC architecture, and representing data as XML made sense for us. HTML
forms have none of this.

3. XForms decidedly works with XML technologies: the markup and data
model use XML; bindings, validation, and actions use XPath; there is
support for XML Schema datatypes; and I probably forget some! There is
support for JSON in XForms 2 though.

4. With XForms need a runtime (or processor, or engine), whether
implemented in JavaScript, as a native mobile app, server-side, or as
a combination of those, because web browsers and mobile operating
systems don't support XForms natively.

5. HTML forms are rarely used plainly nowadays: programmers implement
user interfaces with HTML forms but also a large amount of JavaScript,
custom widgets, and the help of client-side MVC frameworks (see for some fun). Something similar is done on the
XForms side. Implementations provide extensions, custom UI components,
you name it. So it is hard to compare plain, raw XForms vs. plain, raw
HTML. There is much more to forms than this in practice.

Some answers to your questions:

> Web and Mobile data entry.

Hard to say.

> Design of complex forms.

I would say that XForms wins here vs. plain HTML forms.

> In case of HTML5, supports reading XFroms.

HTML 5 does not support reading XForms. However an XForms
processor/engine can translate XForms into HTML forms plus a runtime
(JavaScript or other).

> Integration with other systems and databases.

This is covered neither by HTML forms nor by XForms, except that both
support submitting data one way or the other. HTML forms has limited
submissions capabilities, XForms has more in this respect (XForms
submissions), and is closer to what you can do with JavaScript and

> Less time to develop a web forms designer (not from scratch).

Very hard to say.

> Web browsers support.

No web browser supports XForms natively or probably ever will. But
implementations like XSLTForms run on the client, and others as hybrid
client/server runtime.

> Future support for the technology.
> Please, be honest, I feel like XForms is lo longer supported and everybody
> is moving to HTML 5 forms.

Clearly HTML forms will be here for a long time. XForms's future is
much less clear.

I don't think people are particularly *moving* to HTML forms: HTML
forms have always been in massive use. But it is true that the hopes
one might have had of widespread XForms support on the web have
dimmed, even as the technologies to implement XForms in web browser
using JavaScript, Ajax, web components, and more have become


Received on Tuesday, 27 January 2015 06:12:49 UTC