Download presentation
Presentation is loading. Please wait.
1
XFORMS in minutes Chris Bailey
2
Presentation overview Introduction –What & Why How XFORM works –Code examples –Specific features Problems & Issues References
3
is dead – all hail the ! XForms offers a higher level approach to writing traditional XHTML form-based input. Became a W3C recommendation in 2003 Second edition of the spec released in Sept 2006 XForms WG currently working on 1.1
4
Why use Xforms? Clearer design –Implements separation of concerns via a MVC approach –data model independent from presentation –‘logic’ easier to code Less code –No javascript! Works with existing technologies… –Designed with AJAX in mind
5
Underpinning technologies XML XML Schema XPath DHTML HTTP Javascript Ajax… What you (as the developer) need to know What the xform handling code uses
6
How to do I produce XFORMS? XFORMS are all written in XML When executed XFORMS (D)HTML+Javascript –Pre-compile source code –Dynamic compilation on server –Dynamic compilation on client (browser)
7
XFORM implementations Pre-compilation –AJAXForms –XFormation Server support –Orbeon –IBM Workplace Forms Browser support –X-Smiles Browser addons/extensions –Mozilla XForms –MozzIE –FormsPlayer –FormFaces
8
Quotes “XForms is the most-implemented W3C specification ever at this stage in its life-cycle.” [W3C XForms FAQ] British Government's e-government interoperability framework current guidance is to use the XForms standards as defined by W3C
9
XFORMS MVC Approach Model: Define the format of the data Controller: Specify constraints and relationships View: Simply reference parts of the model
10
XFORMS MVC Approach No empty nodes allowed String, max length 50 chars Enumeration (Male|Female) Date value Integer range{0 < x < 10} Model: Define the format of the data Controller: Specify constraints and relationships View: Simply reference parts of the model
11
XFORMS MVC Approach No empty nodes allowed String, max length 50 chars Enumeration (Male|Female) Date value Integer range{0 < x < 10} Model: Define the format of the data Controller: Specify constraints and relationships View: Simply reference parts of the model
12
Show me some XFORMs! <xforms:bind nodeset="/person/name" type="xs:string" constraint=“string-length(.) Hello world. Please enter your name here: Data model Control binding View
13
Show me some XFORMs! <xforms:bind nodeset="/person/name" type="xs:string" constraint=“string-length(.) Hello world. Please enter your name here: Data model Control binding View
14
Referencing data with XPATH View and controllers reference data model with XPATH expressions e.g. /credit-card/number /credit-card/*[position() = 1] /credit-card/*[starts-with(local-name(),’expiration’)] /credit-card/*
15
Binding attributes (validation) type constraint = 1 and 12 >=."/> required
16
Binding attributes (cont) calculate readonly relevant
17
View attributes appearance="full" appearance ="compact" appearance ="minimal"
18
Disadvantages of XFORMS Enhanced accessibility –The abstraction that xforms offers means that you need not worry so much about the presentation issues Reduced accessibility –At the mercy of the xforms handler –Can AJAX ever be made accessible?
19
Did I mention it’s all XML? OH MY GOSH IT’S ALL XML!!!!!! Not for the faint hearted (or people without a CS degree!) Editors should make this easier when they arrive –OpenOffice.org 2.0 already here
20
References XForms 1.0 (Second Edition) W3C Recommendation 14 March 2006 –http://www.w3.org/TR/xforms/http://www.w3.org/TR/xforms/ XForms 1.1 W3C Working Draft –http://www.w3.org/TR/xforms11/http://www.w3.org/TR/xforms11/ Orbeon Forms –http://www.orbeon.com/http://www.orbeon.com/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.