Well, I make things a little more complicated since my backend isn't Java so
GWT-RPC will not work out-of-the-box.

I my case, i implemented a JSON-RPC library to provide client-server
communication.

The data sent to the client depends on the method called.

So in my case:

The client request the orders of the current day:

First I retreive all the orders of today.
Then I retreive the client for ther orders
Then I retreive the product for the orders.

Then I agregate the results in a JSON-Array and send that array to the
client.

All the records are nested causing some extra payload, but it isn't very
large to make my application slow.

Another option is to send all the associations with only the id of the
object, and send an array with all objects used. This option is much more
efficient but also much more complex. (both client and server).

On Tue, Jul 13, 2010 at 2:55 PM, mk <[email protected]> wrote:

> How do you maintain mapping between Model objects at client browser?
>
>
> Say for example, over the course of user conversation, there were
> three DIFFERENT ajax calls to load CUSTOMER, ORDERS and ITEMS.
>
> Now do you manually map CUSTOMER to ORDER and ORDER to ITEM in client
> to maintain mapping between Model objects..
> ( or do you store CUSTOMER, ORDER, ITEM  separatly with no mapping or
> there is a framework like hibernate mappings but for browser which
> maps model objects with configuration)
>
>
> thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
André Moraes
Analista de Desenvolvimento de Sistemas
[email protected]
http://andredevchannel.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to