Data Submission

Data Submission

Data Submission A component of the rich web application backplane What is submission? • First, serialise some data to send… • …then send it to some end-point… • …and get various events to track progress… • …before receiving some data back. Typical uses • Send data using HTML and VoiceXML forms: – Usually replaces the ‘current form’. • Send and receive data in Ajax: – Try not to replace current page. Current use: HTML and VoiceXML <submit next="log_request" method="post" namelist="name rank serial_number" fetchtimeout="100s" fetchaudio="audio/brahms2.wav" /> Current use: Ajax (1) • var req; • • function loadXMLDoc(url) { • // native XMLHttpRequest object • if (window.XMLHttpRequest) •{ • req = new XMLHttpRequest(); • req.onreadystatechange = readyStateChange; • // IE/Windows ActiveX version • } else if (window.ActiveXObject) • req = new ActiveXObject("Microsoft.XMLHTTP"); • • if (req) •{ • req.onreadystatechange = readyStateChange; • req.open("GET", url, true); • req.send(); •} •} …Ajax (2) • function readyStateChange() { • // '4' means document "loaded" • if (req.readyState == 4) •{ • // 200 means "OK" • if (req.status == 200) •{ • // do something here •} else •{ • // error processing here •} •} •} XForms Submission • Abstract layer with one element. • Data and submission separate: – serialisation…validation…relevance. • Events for start, done, and error: – one submission triggered by the success of another. Submission element <xf:submission id="sub" method="get" action= "http://example.com/customers" /> Submission element <xf:submission id="sub" method="get" action= "file:my-data.xml" /> Submission element <xf:submission id="sub" method="put" action= "mailto:[email protected]?su bject=Results" /> Submission element <xf:submission id="sub-get-contact-list" separator="&" method="get" action="db://Driver=\{Microsoft Access Driver (*.mdb)\};Dbq=contacts.mdb;/tContact s/contact" replace="instance“ instance="inst-contact-list" /> Example: RSS What’s missing? • At least the following: – Proper mapping to a DOM API: • not XMLHttpRequest…some of the best work being done is in wrappers like Dojo, TIBET, etc. – More notification events: • ‘about to serialise’…’about to validate’…etc. – Synchronisation of events: • TIBET allows you to do things when two submissions have finished. Mark Birbeck CEO, x-port.net Ltd. b: http://internet-apps.blogspot.com/ w: http://skimstone.x-port.net/.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us