I have currently finished a paper about XForms (and XFormsMM) for an univerity course called Adaptive User Interfaces. The paper gives a general introduction to XForms as well as to XFormsMM. XFormsMM is a (quite theoretical) approach how multi-modal forms can be build on top of XForms. It’s based on a paper of Mikko Honkala and Mikko Pohja and on the idea of extending XForms with modality-dependent style-sheets.
I have used the following resources, which are also a good starting point to get some information about XForms:
- Mikko Honkala & Mikko Pohja, Multimodal Interaction with XForms: An approach as well as a reference implementation, which shows how mulit-modal applications can be build on top of XForms.
- Micah Dubinko, XForms Essentials: A great (and free!) book, that gives a good introduction to XForms. It was published by O’Reilly 2003.
To get started and to get an idea of what XForms is, I’ve made a small example using the FormFaces library:
The code is quite simple. First of all, you have to declare some namespaces for XForms itself and for the XML events XForms is using:
Now you can declare an XML data-model to be modified with the form, e.g. from an XML file:
The corresponding XML file looks like this:
123 false false 0 0
Now, you can write XForms controls to operate on this data-model. A simple control can look like this:
How many houres are you online per day?
Please enter a valid periode!
So, all together:
- The example data model (XML)
- FormFaces library @ Sourceforge.com
- My paper (PDF)
- My presentation (PDF)
Best regards, Thomas Uhrig.