webforms 2 submission/validation model

I was reading some of the webforms 2 spec, when I stumbled across the steps for form submission. The first step is to check the form for validity, presumably using an implementation in the user agent. The 6th and 7th step deal with encoding and sending the form to the server, and step 8, the last one, deals with handling the response from the server.

I’m a bit wary of the value of spending energy implementing validation on the client. The server-side processing always needs to implement this anyway. As far as I can tell, there’s no mechanism for the application on the server to know that the content has been properly validated using a compliant agent in all instances. Therefore, the vo alue of any validation happening on the client is a shorter feedback loop for content-producers (users). However, in addition, in order for this feedback loop to be of use to users, they will need more information than the type and format of the correct input. The information most needed is why the particular application they are currently interacting with finds their input unacceptable.

I suggest creating protocol (perhaps based on atom publishing protocol) for exchanging messages between the client and application. This will allow users to continuously correct their input until the application responds that the impending submission will be processed faithfully. Then the users can commit their changes knowing that the application won’t simply reject it, and developers can focus implementation energies on a single authoritative implementation. The strong typing characterized by the web forms 2 spec can be implemented as a base class available for application developers to subclass more appropriately to their own applications.


One Comment

  1. Posted April 5, 2013 at 1:15 am | Permalink

    When I initially commented I clicked the “Notify me when new comments are added”
    checkbox and now each time a comment is added
    I get four e-mails with the same comment. Is there any way you
    can remove me from that service? Thanks!

Post a Comment

Required fields are marked *

%d bloggers like this: