Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
XForms and eXist
A perfect couple
         Erik Bruchez
    ebruchez@orbeon.com
A demo
XForms


• Represents form data as XML
• But how do you persist it?
XForms Persistence


    There is no such thing!
<xforms:submission>


• Allows XForms to “talk” to the world
• Fully supports REST in XForms 1.1
REST

• Using HTTP the way it was meant to be
• Identify resources with URIs
• Methods: GET, PUT, DELETE, POST
Traditionally

• UI written with Java, Ruby, ...
• Data captured as objects
• Relational database
• O-R mapping to bridge ...
Issues


• Middleware to do the mapping
• More software
What about XForms?

• Implement a REST service
• XML-relational mapping
• Or store in BLOB columns
Is there a better way?
eXist

• Native XML database
• Open source
• XQuery
• REST API
2+2=?
Perfect Match


• XML
• REST
No need for a middle
       man!
GET
<xforms:submission
  serialization=”none”
  method=”get”
  action=”http://localhost/exist/db/docs/form1.xml”
  replace...
PUT
<xforms:submission
  ref=”instance(‘form-instance’)”
  method=”put”
  action=”http://localhost/exist/db/docs/form1.xml...
DELETE
<xforms:submission
  serialization=”none”
  method=”delete”
  action=”http://localhost/exist/db/docs/form1.xml”
  r...
POST
<xforms:submission
  ref=”instance(‘search-query’)”
  method=”post”
  action=”http://localhost:8080/exist/db/docs/”
 ...
XQuery
<xforms:instance id=”search-query”>
  <exist:query>
     <exist:text>
        xquery version quot;1.0quot;;
       ...
Using XQuery results


• Output values with <xforms:output>
• Iterate with <xforms:repeat>
Conclusion

Using XForms and eXist allows you to do all
the Create/Read/Update/Delete (CRUD) and
 search operations withou...
Q &A
XForms and eXist: A Perfect Couple
You’ve finished this document.
Download and read it offline.
Upcoming SlideShare
Dating, Lies and Algorthms
Next
Upcoming SlideShare
Dating, Lies and Algorthms
Next
Download to read offline and view in fullscreen.

Share

XForms and eXist: A Perfect Couple

Download to read offline

These are the slides I presented on December 3, 2007 at the XForms Evening / XML 2007 event in Boston.

Related Books

Free with a 30 day trial from Scribd

See all

XForms and eXist: A Perfect Couple

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

    Jun. 15, 2021
  • LouizaSiTayeb

    Feb. 1, 2016
  • emchateau

    Feb. 15, 2014
  • roxietwa

    Mar. 1, 2013
  • arrialre

    Mar. 1, 2013

These are the slides I presented on December 3, 2007 at the XForms Evening / XML 2007 event in Boston.

Views

Total views

259,670

On Slideshare

0

From embeds

0

Number of embeds

179

Actions

Downloads

148

Shares

0

Comments

0

Likes

5

×