Slideshow transcript
Slide 1: XForms and eXist A perfect couple Erik Bruchez ebruchez@orbeon.com
Slide 2: A demo
Slide 3: XForms • Represents form data as XML • But how do you persist it?
Slide 4: XForms Persistence There is no such thing!
Slide 5: <xforms:submission> • Allows XForms to “talk” to the world • Fully supports REST in XForms 1.1
Slide 6: REST • Using HTTP the way it was meant to be • Identify resources with URIs • Methods: GET, PUT, DELETE, POST
Slide 7: Traditionally • UI written with Java, Ruby, ... • Data captured as objects • Relational database • O-R mapping to bridge the gap
Slide 8: Issues • Middleware to do the mapping • More software
Slide 9: What about XForms? • Implement a REST service • XML-relational mapping • Or store in BLOB columns
Slide 10: Is there a better way?
Slide 11: eXist • Native XML database • Open source • XQuery • REST API
Slide 12: 2+2=?
Slide 13: Perfect Match • XML • REST
Slide 15: No need for a middle man!
Slide 16: GET <xforms:submission serialization=”none” method=”get” action=”http://localhost/exist/db/docs/form1.xml” replace=”instance” instance=”form-instance”/>
Slide 17: PUT <xforms:submission ref=”instance(‘form-instance’)” method=”put” action=”http://localhost/exist/db/docs/form1.xml” replace=”none”/>
Slide 18: DELETE <xforms:submission serialization=”none” method=”delete” action=”http://localhost/exist/db/docs/form1.xml” replace=”none”/>
Slide 19: POST <xforms:submission ref=”instance(‘search-query’)” method=”post” action=”http://localhost:8080/exist/db/docs/” replace=”instance” instance=”query-results”/>
Slide 20: XQuery <xforms:instance id=”search-query”> <exist:query> <exist:text> xquery version "1.0"; <documents>{ for ... return ... }</documents> </exist:text> </exist:query> </xforms:instance>
Slide 21: Using XQuery results • Output values with <xforms:output> • Iterate with <xforms:repeat>
Slide 22: Conclusion Using XForms and eXist allows you to do all the Create/Read/Update/Delete (CRUD) and search operations without any middleware. The result is increased simplicity.
Slide 23: Q &A




Add a comment on Slide 1
If you have a SlideShare account, login to comment; else you can comment as a guest- Favorites & Groups
Showing 1-50 of 1 (more)