[Mapbender-dev] AJAX client/server interface

Christoph Baudson christoph.baudson at wheregroup.com
Thu Jul 3 09:22:25 EDT 2008


Up to now, Mapbender passes random data structures during AJAX calls. 
You always have to write the same data handling functions over and over 
again, error-checking etc.

It would be nice to have a standard data structure that is passed 
between client to server and vice versa. If these were always of the 
same structure, we could add functions that would do the obvious 
error-checking and (de)serialization.

At the moment I use these, please tell me what is missing, or if I'm 
completely wrong.

To send from client to server:

queryObj: {
    command:"a string that tells the server side what to do with the 
parameters",
    parameters:{
       // data
    }
}


To send from server to client:

resultObj: {
    success:boolean,
    message:"an optional message for the client to display",
    data:{
       // data
    }
}

-- 
_______________________________________

W h e r e G r o u p GmbH & Co. KG

Siemensstraße 8
53121 Bonn
Germany

Christoph Baudson
Anwendungsentwickler

Fon: +49 (0)228 / 90 90 38 - 15
Fax: +49 (0)228 / 90 90 38 - 11
christoph.baudson at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
_______________________________________

Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Arnulf Christl, Olaf Knopp, Peter Stamm
_______________________________________
 



More information about the Mapbender_dev mailing list