The fall and rise of XForms @StianSigvartsen - - PowerPoint PPT Presentation

the fall and rise of xforms
SMART_READER_LITE
LIVE PREVIEW

The fall and rise of XForms @StianSigvartsen - - PowerPoint PPT Presentation

The fall and rise of XForms @StianSigvartsen http://metaphorm.wordpress.com Overview A history of W3C XForms specifications XForms explained by example The future of XForms W3C XForms 1.0 August 2000 Working Draft for 2 years


slide-1
SLIDE 1

The fall and rise of XForms

@StianSigvartsen http://metaphorm.wordpress.com

slide-2
SLIDE 2

Overview

➲ A history of W3C XForms specifications ➲ XForms explained by example ➲ The future of XForms

slide-3
SLIDE 3

W3C XForms 1.0

➲ August 2000 – Working Draft for 2 years ➲ November 2002 – Candidate Recommendation ➲ August 2003 - Proposed Recommendation

➲ 14 October 2003 – Recommendation

➲ Interoperability with XML Schema datatypes ➲ But required a browser plug-in in most cases ➲ M$ had other plans: Xdocs (a.k.a. InfoPath)

slide-4
SLIDE 4

W3C XForms 1.1

➲ July 2006 - Working Draft ➲ November 2007 – Candidate Recommendation ➲ August 2009 – Proposed Recommendation

➲ 20 October 2009 – Recommendation

➲ Shift towards server side implementations ➲ Access SOAP, REST, ATOM, non-XML services ➲ Generalised XML insert & delete actions

slide-5
SLIDE 5

W3C XForms 1.1 Implementations

➲ Client side

  • FormFaces
  • Ubiquity XForms
  • XSLTForms

➲ Server side

  • Chiba
  • Smartsite Forms
  • BetterFORM
  • AJAXForms
  • Orbeon

Many, many more...

http://www.w3.org/community/xformsusers/wiki/XForms_Implementations

slide-6
SLIDE 6

Some related specifications

➲ XML (!) ➲ XML Schema ➲ XPath ➲ HTTP ➲ SOAP ➲ REST (ok, not really a specification)

slide-7
SLIDE 7

Example HTML form

<html> <head>...</head> <body> <form name=”exampleform” action=”submit.jsp” method=”post”> <label for=”ageinput”>Please enter your age</label> <input id=”ageinput” name=”age”> <input type=”submit” value=”Go”/> </form> </body> </html>

➲ Cannot submit to a XML REST service ➲ No real-time validation, and...

slide-8
SLIDE 8

Complexity in submit.jsp

✔ Read the “age” request parameter ✔ Validate as a number ✔ Transform into XML format ✔ Send to REST service ✔ Interpret REST service response ✔ Produce HTML response

✔ … or write JQuery script to make client-side

AJAX submissions to the REST service

slide-9
SLIDE 9

The same example as an XForm...

slide-10
SLIDE 10

<html

xmlns=”http://www.w3.org/1999/xhtml” xmlns:xf=”http://www.w3.org/2002/xforms” xmlns:anyns=”http://anyns.org” xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>

<head> <xf:model> <xf:instance id=”details”> <anyns:details> <anyns:age/> </anyns:details> </xf:instance> <xf:bind id=”age” ref=”anyns:age” type=”xsd:numeric”/> <xf:submission id=”process” ref=”instance('details')” method=”post” action=”service.jsp”/> </xf:model> </head> <body> <xf:input bind=”age”> <xf:label>Please enter your age</xf:label> </xf:input> <xf:trigger> <xf:label>Go</xf:label> <xf:send ev:event=”DOMActivate” submission=”process”/> </xf:trigger> </body> </html>

slide-11
SLIDE 11

REST service.jsp receives...

<anyns:details xmlns:anyns=”http://anyns.org”> <anyns:age>42</anyns:age> </anyns:details>

➲ No submit.jsp script needed ➲ Service might respond with...

<anyns:result xmlns:anyns=”http://anyns.org”> <anyns:message>The older, the wiser!</anyns:message> </anyns:result>

slide-12
SLIDE 12

Rendering response to user

... <head> <xf:model> ... <xf:instance id=”response”> <anyns:result> <anyns:message/> </anyns:result> </xf:instance> ... <xf:submission id=”process” ref=”instance('details')” action=”process.jsp” method=”post” replace=”instance” instance=”response”/> <xf:bind id=”servmsg” ref=”instance('response')/anyns:message”/> </xf:model> </head> <body> ... <xf:output bind=”servmsg”/> ... </body> ...

slide-13
SLIDE 13

W3C XForms 2.0

➲ June 2011 – Editor's Draft (Wiki) ➲ Custom functions ➲ Variable support ➲ Pluggable expression language ➲ JSON, CSV and other external instance

data formats

slide-14
SLIDE 14

Thanks! Questions?

@StianSigvartsen http://metaphorm.wordpress.com