Client-Server Interaction question


I’m not sure if this is the right category to ask this but here it is:
I would like to move the data of an object from the server to the client.
I know this can be done via UIDL but it means I need to input all the basic data types individually to the UIDL
and I basically just want to make a copy of the server side component to the client side.
So is there a way to put an entire object into UIDL or is the it limited to basic data types?
Can I do this some other way?


I think you’ll have to do the object serialization yourself, if you wish to pass a complex object within UIDL.

I’d like to hear more about what you’re trying to implement, since the idea of passing a complete object within UIDL seems like bad practice.

I’m implementing a library which uses a base class. The base class uses data container objects to take the data from them and turns it into JSON which it passes on to GWT. I don’t want to modify this library.
Currently I just create the objects on the client side and get the data to those from the server,
using UIDL and basic data types. I was just thinking if there would have been a better/easier way of doing this.

I have copied most of the API of the library to the server side.
I have one class making all the stuff on the client and I’d like to make it a bit more object oriented.
The class is getting pretty messy.
I was thinking of doing a counterpart of all the server side classes to the client side but I didn’t get it to work.
Most of the classes on the server side are basically just data containers and I’d need to get the hierarchy to the client to get the library to work.