These easy to understand XForms tips show you how to get the most out of your XForms. In this XForms and Perl tip, you’ll learn how to submit an XForms form using POST to a Perl script, and capture the data for later use. This tip shows you how to access the submitted XForms data using a Java servlet. This tip looks at both the XForms and Ajax versions and how to combine the two techniques and in this XForms and PHP tip, you will see how to create a PHP script that can receive and work with XML data submitted by an XForms form.
Too much XML, too complex, too verbose. I find better and easier normal forms and Ajax to send data in JSON format to the CGI. No submit button. MochiKit is a nice and small javascript library, for those interested. XML only complicates things.
Plus: XForms is not supported by default in any browser.
Edited 2006-10-05 22:16
No getting away from xml using dom and ajax. I’m not certain xforms look that much better for the trouble really, I’d heard they were supposed to make your page look like a native program, the shots were a bit of a let down.
Agreed. XML is cumbersome compared to JSON. It makes sense when the data is highly complex, needs to be structurally validated against a schema, etc. But for the examples given in the article, simply using JSON would have been faster to parse and faster to program.
You also make a *very* good point in that XForms isn’t natively supported by any browser. It looks to me like JSTL for the client side. I’m not sure how useful this will be in the future — I suspect it may get the same bland reception WebDAV has endured in the face of good CMSes/blogs ….
Unless a new technology is simply groundbreaking, it’s far more likely the old stuff will continue to overshadow indefinitely because of the mindshare and libraries.
Edited 2006-10-06 15:58
Wasn’t XForms supposed to be supported natively by FF >=1.5 ? The article says an extension is needed and I think it’s right.
http://developer.mozilla.org/en/docs/Firefox_1.5 (old Firefox feature preview stating XForms should be supported)
Edited 2006-10-06 07:06
You have perl but no python?
-Ad
From the “they have the internet on computers now?” department, this is what I got from reading the links:
you can use programming languages to read the contents of a POST request.
Truly a paradigm-shifting post.
Great for personal or corporate intranet stuff. A nice shiny example might be in order though, here’s a UBL Invoice xform from my personal stash (requires Firefox with XForms extension):
http://www.furthernorth.net/finance/invoices/editor/xform.xhtml
Particularly nice if your goal is to save data in XML format on the server: XML file or XML database.
Thanks for the article!