XForms Bringing the Power of XML to Everyone ç”° - PowerPoint

W
Document Sample
scope of work template
							 XForms: Bringing
 the Power of XML
    to Everyone
                田
       Micah Dubinko
     Editor, XForms 1.0
http://dubinko.info/writing/xforms/
Brought to you by the letters XFE




       http://dubinko.info/writing/xforms/
Introduction




  “In the beginning…the earth was without
  form and void”
  --Genesis 1:1,2
Long time coming

• Pre-Web:     Proprietary; binary formats
• 1993:        HTML forms
• 1994–2002:   Nothing new
• Today:       XForms & proprietary
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
Implementation Strategies
   •Chiba      •DENG •FormsPlayer
   •OXF               •XFE         •X-Smiles
   •IBM(1)     •Ripcord            •Novell
               •nForms •Oracle(1)
                                    •Oracle(2)
    •jXForms                •IBM(2)
                •Xero
                             •MobiForm


  Server … Zero-install client … Application
Example:
<input ref=“q”>
  <label><html:img src=“images/google.jpg”
alt=“Google Search:”/></label>
  <send ev:event=“DOMActivate”/>
</input>
More Quotes

  “What the world really needs is more love
  and less paperwork.”
  --Pearl Bailey


  “XML lets organizations benefit from
  structured, predictable documents. Thus,
  XML breeds forms. QED.
  --David Weinberger
More Examples

• Working Group Examples
  – http://www.w3.org/MarkUp/Forms/2002/Exa
    mples/


• Test Suite
  – http://www.w3.org/MarkUp/Forms/Test

  – Of course, www-forms@w3.org
Benefit: Unify Client and Server


            Server               Client

            XForms               XForms
           Processor            Processor

•Server process for    XForms     •Client process for
“data double check”               optimal data entry
                       Model

•Less CGI hacks = better security
Foundations: XPath




  “Nobody trips over mountains. It is the
  small pebble that causes you to stumble.
  Pass all the pebbles in your path, and you
  will find you have crossed the mountain.”
  --Traditional Proverb
  XForms Architecture

  XHTML 2.0    SVG   FO    SMIL   ?
           Form Controls




XForms Model              XForms Actions
 XML Schema    XPath      XML Events
               XML
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
   Binding


         <head>           <bind id=“xyz”
           XForms Model   nodeset=“memo/cc”
         </head>          required=“1”/>

         <body>

Insert                    <input bind=“xyz”…>
LOTR
joke     </body>          <input ref=“memo/cc”…>
here
Form Building Blocks

• XForms lives in multiple locations within a
 single “containing document”
             <head>              Purpose
   <html>      XForms Model      (non-visible)
             </head>

             <body>
  </html>                        Presentation
                                 Form controls
             </body>
Fundaments: XML Schema




  “Knowledge is of two kinds. We can know
  a subject ourselves, or we can know where
  to find information on it.”
  --Samuel Johnson
  XForms Architecture

  XHTML 2.0    SVG   FO    SMIL   ?
           Form Controls




XForms Model              XForms Actions
 XML Schema    XPath      XML Events
               XML
XForms Model




  ARTHUR: Camelot!
  GALAHAD: Camelot!
  LANCELOT: Camelot!
  PATSY: It’s only a model.
  Arthur: Shhh!
  --Monty Python and the Holy Grail
XForms Model

• Single, device-
  independent XML form
  definition
• Works with standard or
  proprietary user interfaces
• Defines the „Purpose‟ of
  the form
XForms Constraints

• Static (from Schema) and dynamic
  – Datatypes
  – Relevant
  – Required
  – ReadOnly
  – Validation
  – Calculation
  – Minimum/maximum occurrences
User Interface
  “A human being should be able to change
  a diaper, plan an invasion, butcher a hog,
  conn a ship, design a building, write a
  sonnet, balance accounts, build a wall, set
  a bone, comfort the dying, take orders,
  give orders, cooperate, act alone, solve
  equations, analyze a new problem, pitch
  manure, program a computer, cook a tasty
  meal, fight efficiently, and die gallantly.
  Specialization is for insects.”
  --Robert A. Heinlein
User Interface



 <input>       <trigger>         <select>
 <secret>       <submit>        <select1>


               Total: $300.00
 <upload>      <output>         <range>

  • Describes intent, not presentation
Advanced User Interface

• Grouping
• Dynamic Presentation
  – Multiple pages
• Repeating Tables
Actions & Events


  “While we are free to choose our actions,
  we are not free to choose the
  consequences of our actions”
  --Stephen Covey


  “We are not ready for any unforeseen
  event that may or may not occur.”
  --Dan Quayle
XForms Actions
• Defines common set of behaviors
• Based on XML Events
• No JavaScript required
  –   Message
  –   Send
  –   Setvalue
  –   Setfocus
  –   Toggle
  –   Load
   More Examples
• <message level=“ephemeral”>Please enter the number…</message>
• <message level=“modeless”>Have you forgotten your
  password</message>
• <message level=“modal”>This field is required (Street)</message>




                                                 modeless
       ephemeral


                      modal
XML Events

• Event-driven
  – modelInitialize
  – Focus/blur, next/previous
  – valueChanged
  – Help/hint/alert
  – Submit/reset
  – Error conditions
Submit




  “This element encodes how, where, and
  what to submit.”
  --XForms Candidate Rec, 12 Nov 2002
Data Submission                   Submit


• XML in/XML out; or legacy format…
  – Including Binary data
• GET, PUT, or POST
• File system, HTTP, or e-mail
Style




  “Never offend people with style when you
  can offend them with substance.”
  --Sam Brown
CSS, Level 3

• New styles for form controls; basic UI
• Ability to apply style to readonly, required,
  relevant, etc.
Accessibility, Design,
Troubleshooting


   “There are two ways of constructing a
   software design: One way is to make it so
   simple that there are obviously no
   deficiencies, and the other way is to make
   it so complicated that there are no obvious
   deficiencies.”
   --C. A. R. Hoare
Usability


              help




                     alert
       hint
Section 508 Accessibility

• Accessible web forms for everybody
  – Not keyboard-centric
  – Events for focus, navigation
  – Script not required
  – Captions/metadata
• Multimodal forms
 …on any Device


    • appearance= “full” | “compact” | “minimal”




     “full”          “compact”         “minimal”
(always visible)   (scroll bars)        (popup)
Extending XForms




  “Still, what an arm! and I could alter it: But
  all the play, the insight and the stretch—
  Out of me, out of me!”
  --Robert Browning
What about InfoPath?




  “Do not go where the path may lead; go
  instead where there is no path and leave a
  trail.”
  --Ralph Waldo Emerson
GFDL

• Full text and graphics available under
  open content license
• http://dubinko.info/writing/xforms/
Help Make XForms Better!

• Vote For XForms in Mozilla!
• http://bugzilla.mozilla.org/show_bug.cgi?id=97806

• Even better: help implement XForms in
  Mozilla
    Try Out XForms
• Implementations:
•   Novell http://www.novell.com/xforms/
•   X-Smiles http://www.xsmiles.org
•   FormsPlayer http://www.formsplayer.com
•   Mozquito http://webaccess.mozquito.com
•   Oracle http://otn.oracle.com/tech/wireless/mobilebrowser.htm
•   IBM http://www.alphaworks.ibm.com/tech/xmlforms
Making the Transition

• Deploy XML data (Web Services)
  – RPC-style bad; Document-style better
  – Plain-old XML even better
• Don‟t assume browser-only access
• Avoid dependence on HTML processing
• Think beyond client-server
• Embrace open standards
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/
• http://dubinko.info/writing/xforms/
Thank You!

• Please fill out an evaluation form

						
Related docs