Download presentation
Presentation is loading. Please wait.
Published byShanon Miles Modified over 9 years ago
1
XForms: A case study Rajiv Shivane & Pavitar Singh
2
Building a generic Web-Service client Problem statement: Need to build HTML forms for invoking operations on any web-service given it’s WSDL –Web services defined using WSDL –Operations are declared in WSDL Why XForms –Single Servlet to generate HTML for invoking any web- service –Generates dynamic forms for Collection data types –Ease of invoking web-service as submitted data is in XML format –Built in validation framework
3
Implementation overview WebService WSDL Servlet Parses XFORM Builds Chiba Renders Browser User Enters Data InvokesOperation Response Described By 1 2 3 4 5 6 7
4
Sample input-form for an operation
5
Form populated with web-service response
6
How Easy it is
7
XForms: An introduction
8
What is XForms ? –Next generation web forms from W3C –W3C Recommendation since October 2003 –Aims at replacing HTML forms –But supports any host language
9
XForms Goals Make Web form design easier –Less client-side (JavaScript) code –Less server-side code –More functionality! Capture data from end-user in XML
10
Problems with HTML Forms Dependence on Scripting Languages Like Java Script and VB Script to do common tasks –Marking Required Controls –Validations –Calculations –Error Messages –Conditional Layout Difficulty of Initializing Form Can Represent Only Flat Data (Name Value Pairs) Reintrepreting Data Format at every stage of workflow
11
Conceptual Structure of XForms
12
Sample XForm
13
Model Section Model Element in Xforms Document Contain Child Elements –Instance –Bind –Submit
14
Bind
15
Model Section Encapsulates Data Aspects of a Form Uses XML Schema to Define Constraints Uses Xpath to Define Model Properties Captures What, How and Where to submit Enable Reactive User Interfaces Encourage declarative authoring
16
UI Controls
17
Connects User Interface to the Model Uses Xpath to address nodes in the instance UI controls collects user input Bind to underlying model Controls are designed for accessibility Abstract Controls encourage Device Independence
18
UI Controls
24
Complex User Interfaces Aggregation construct –Group logically related user –Enables Refactoring
25
Complex User Interfaces Dynamic User Interaction with –Enables any of logically groups to be selectively displayed to the User –Use declarative Event Handler
26
Complex User Interfaces Repeating structures with repeat –Very powerful construct
27
Event Handlers
28
Events Bring User Interface to life Give access to eventing via XML Events Attach Dynamic Behavior Obviate common use of scripts via declarative actions
29
Events Categories Initialization –Events raised as various Xform components are initialized Interaction –Raised by user interaction e.g Request for a Help Notification –Raised by Xforms processing model –To trigger different steps in Xforms processing Errors –Raised when specific type of error conditions are encountered
30
Native Xform Support in Web Browsers Microsoft doesnt want to support it –Competing with InfoPath Mozilla/Firefox Support –In the works but not yet deployed –But still market share under 10% But is That a Problem if we want to implement XForm ??????
31
The Solution Server-side emulation layer A/K/A server-side XForms Developer writes XHTML and XForms, as he would with an XForms-aware web browser Server-side XForms engine translates this into (X)HTML, CSS, and lightweight JavaScript Uses AJAX to achieve asynchronous validation
32
Implementations for Server Side XForm Orbeon PresentationServer (OPS) Chiba → Both are open source
33
Thanks Q&A
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.