2 thoughts on “Serverpost proposed specification (draft)”

  1. ok, comments on the spec:
    “The <http:serverpost/> element is an XML element to process all form controls within its document associated with that
    <http:serverpost/> element.”
    s/its/the/ ?
    “The <http:serverpost/> element must support event handlers for the following events: HTTPResponseReceived, HTTPResponseError, error.”
    this seems to be a pretty complicated way for writing “Event handlers can be specified using the onHTTPResponseReceived, onHTTPResponseError, onerror attributes”. Generally, I find the spec to be written very implementor-centric.
    getSuccessfulFormControls: This seems more complicated than it needs to be. Why not make it return a normal javascript array, like you can get with:
    my_array[“foo”] = “bar”;
    interpret foo like the name, bar like the value.
    That way, you can’t have an invalid name/value relationship, and you can rewrite the definition of a successful form control:
    A successful form control is one where at least one name/value pair exists.
    let me also point out that as written, your spec does not work with any existing element, like <html:input> or <xul:textbox>, which would make this much more useful 🙂

  2. by using a disabled=”true” attribute with a null namespace or the http: namespace.
    this is the first time that you mention namespaces for attributes 🙂 maybe you should make it explicit which namespace the other attributes are in?
    also, is it a good idea to allow the null namespace for disabled? hm.. this is to allow interpretation by both xul and serverpost, I guess?
    “must be the basis for immediately throwing an exception ”
    what exception?
    bah, js… I dislike languages w/o types… but does it trigger onerror?
    there seems to be no way to cancel a submit from onsubmit
    requester The actual object which submits HTTP messages to the server and receives HTTP responses.
    what kind of object is this? What methods / attributes does it have? What interface does it implement?
    abort() Cancels any submission to the server if not yet sent, or the expectation of a response if the
    HTTP request message has been sent.
    mention that onHTTP* handlers won’t be called?
    getHTTPMessageObj() Returns an object containing the body of the document and specific HTTP headers to set on
    the requester.
    again how does this object look like? how are the attributes named to access the body / headers?
    responseHeaders A collection of headers from the HTTP response message rec4eived by the <http:serverpost/> element’s
    requester.
    remove the 4 😉
    “collection”? can it be accessed like an array? mention that if so 🙂 if not, mention how.
    status The HTTP response message’s HTTP status code.
    This would be 200, 404, etc?
    statusText The HTTP response message’s HTTP status text.
    this would be like “HTTP/1.1 200 OK”?
    “must throw an exception and cancel the submission of the form.”
    I’d write this as “will throw an exception”, and maybe you should give details about the exception. Did I mention that I hate the lack of types in JS?
    “exception thrown must indicate to the application a need for an alternate content-type which the element
    supports.”
    how will that be indicated?
    did I mention that I’d prefer this to be written more from the perspective of the caller? 🙂
    — end of comments —

Comments are closed.