RE: XForms submission: synchronous?

John, let's continue this morning's discussion on this topic after lunch
at the F2F.
Leigh.

________________________________

From: www-forms-request@w3.org [mailto:www-forms-request@w3.org] On
Behalf Of John Boyer
Sent: Wednesday, June 14, 2006 1:07 PM
To: www-forms@w3.org
Subject: XForms submission: synchronous?



Current XForms 1.0 reads that submission is synchronous 
because DOMActivate on trigger "dispatches" xforms-submit. 

The spec does not say "(may|should|must) launch a separate 
thread to dispatch" xforms-submit. 
    
Then, xforms-submit capture, bubble and default processing 
occur.  The default processing then describes the occurrence 
of the entire submission down to done or error. 

Therefore, it is currently reasonable for an XForms author to 
assume that a send action which does an instance replacement 
will actually replace the instance before the next action after 
the send occurs. 

To be fair, it would be *better* for that author to write the follow-on 
actions after a send action into the xforms-submit-done handler 
in order to ensure that the follow-on actions occur only if the 
submission is successful.  And if this is done, then the resulting 
form would operate correctly whether submission is synchronous 
or asynchronous. 

Moreover, there's a lot of benefit to being asynchronous, and some 
implementations at least have already gone that route despite what 
the spec says, so this email is being sent to promote discussion 
about the issue so we can get alignment, either for 1.0 or 1.1. 

In particular, it was stated here at the FtF that the option of
synchronicity 
was deliberately left open so as not to preclude implementation on 
small devices.  So, clearly the language should be that a submissoin 
MAY be asynchronous. 

Moreover, if a submission is asynchronous, then how far into the 
process does it get while still blocking the initiating thread?  In
other 
words, is the whole dispatch of xforms-submit done by a separate thread?

Or do we only branch to a separate thread some time after taking a 
snapshot of the data to be submitted?   Otherwise, the sufficiently 
talented user could change the data between the point where we 
prune and validate and the point where the data is transmitted. 

John M. Boyer, Ph.D.
Senior Product Architect/Research Scientist
Co-Chair, W3C XForms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer

Received on Wednesday, 14 June 2006 20:31:50 UTC