Notes
Outline
Easing Development Pain with XForms
Micah Dubinko
Chief XML Architect
Cardiff Software
http://www.Cardiff.com
About Your Guide
Editor of XForms specification
Software Engineer for Cardiff Software
O’Reilly Book and magazine articles
Contributing Editor http://www.xmlhack.com/
CDIA certified
mdubinko@Cardiff.com
Target Applications
Web Interfaces
Embedded Device with UI
Remote Administration
Data Entry / Workflow
For the Curious and the Thrill-seekers
Demonstration: X-Smiles
Brief History of Web Interfaces
B.Web: Proprietary; binary formats
1993: HTML forms
1994–2001: Nothing happened
Today: XForms & Extensions
Limitations of HTML Forms
Need Script to do anything…
Validations
Calculations
Dynamic Forms
Some Assembly Required
<input value=“initial value”>
Primitive Data Representation
Name=Micah&Title=Chief+XML…
Scripting Closes Doors
Key Design Factors in XForms
XML In; XML Out
80/20
Embrace existing practice
Integration with Web Services; Tools
Leverage XPath, XML Schema, XSLT
Any Time, Any Place, Any Device
XForms Architecture
Example:
Form Building Blocks
XForms lives in multiple locations within a single “containing document”
XForms Model
Single, device-independent XML form definition
Works with standard or proprietary user interfaces
Defines the ‘Purpose’ of the form
XForms Instance
Based on XPath
Provides template for your data
Provides default or partially submitted data
Can be inline or referenced externally
Full support for XML Schema
XForms Constraints
Static (from Schema) and dynamic
Datatypes
Relevant
Required
ReadOnly
Validation
Calculation
Minimum/maximum occurrences
More Examples
Working Group Examples
http://www.w3.org/MarkUp/Forms/2002/Examples/
Test Suite
http://www.w3.org/MarkUp/Forms/Test
Of course, www-forms@w3.org
Data Submission
XML, or legacy format…
Including Binary data
GET, PUT, or POST
File system, HTTP, or e-mail
Processing Pipeline
User Interface
Describes intent, not presentation
…on any Device
appearance= “full” | “compact” | “minimal”
Usability
Advanced User Interface
Grouping
Dynamic Presentation
Multiple pages
Repeating Tables
Binding
XForms Actions
Defines common set of behaviors
Based on XML Events
No JavaScript required
Message
Send
Setvalue
Setfocus
Toggle
Load
XForms Actions Replace Script
Defines common set of behaviors
Direct replacements for scripting
<message> replaces alert()
<send> replaces form.submit()
<setvalue> replaces form.field.value=“string”
<setfocus> replaces form.field.focus()
<load> replaces document.href=“url”
<toggle> implements dynamic show/hide
More Examples
<message level=“ephemeral”>Please enter the number…</message>
<message level=“modal”>This field is required (Street)</message>
<message level=“modeless”>Have you forgotten your password</message>
XML Events
Event-driven
modelInitialize
Focus/blur, next/previous
valueChanging/valueChanged
Help/hint/alert
Submit/reset
Error conditions
Unify Client and Server
Section 508 Accessibility
Accessible web forms for everybody
Not keyboard-centric
Events for focus, navigation
Script not required
Captions/metadata
Multimodal forms
XForms Roadmap
Making the Transition
Deploy XML data (Web Services)
RPC-style bad; Document-style good
Plain-old XML even better
Don’t assume browser-only access
Avoid dependence on HTML processing
Think beyond client-server
Embrace open standards
Help Make XForms Better!
Vote For XForms in Mozilla!
http://bugzilla.mozilla.org/show_bug.cgi?id=97806
Try Out XForms
Implementations:
Novell http://www.novell.com/xforms/
X-Smiles http://www.xsmiles.org
Mozquito http://webaccess.mozquito.com
E-XMLMedia http://www.e-xmlmedia.com/prod/xfe.htm
Authoring Tools
Cardiff LiquidOffice
http://www.Cardiff.com/xforms/
For More Information…
www-forms@w3.org (subj: “Subscribe”)
http://www.w3.org/TR/xforms/
http://www.w3.org/MarkUp/Forms
http://dubinko.info/blog/
http://www.xml.com/
Book coming in 2003
http://dubinko.info/writing/xforms/