[gradebook2-dev] How GWT-RPC handles polymorphic serialization?

Jon Gorrono jpgorrono at ucdavis.edu
Mon Jul 5 17:26:16 PDT 2010


André Moraes wrote:
> The GWT has the standard GWT-RPC to make easier to create RPC calls
> and fetch data from the server, but this tool only works if we have
> Java on the server side.
>
> In my current project, the server side will be .NET based.
>
> So I wrote a JSON-RPC library which implements the JSON-RPC standard
> to provide RPC facilities.
>
> The library is OK but I don't have the serialization facilities and I
> need to manually populate a JavaScriptObject with the information that
> i want transfered.
>
> I started now to write a automated serialization for the objects based
> on Annotations and Generatos, but i don't know how to discover the
> type of my object at runtime.
>
> I have a lot of polymorphic associations and will be nice to have some
> of those  in my DTO's.
>
> So is there a way that I can get the type of a Object in GWT at
> runtime or I need to provide some Interface that my DTO's will need to
> implement that will have a method which returns some value that
> identify the type?
>
> If I need to use the Interface approach, is there a way that using
> generators I change the code of the class and then implement in a
> automated way? (Whithout defining the generator for each class in the
> module.gwt.xml)
>
> Thanks.
>
>   
Hope this yeilds a good answer....A progressive answer would help us get 
out of the habit of prefixing keys to values by the type code....

-- 
Jon Gorrono
email{>+++++++++[>+++++++++++>++++++++++++>+++++++>+++++<<<<-]>+++++++.>++++.<---.>-.+++..---.-.+.>+.<++++++.<----.+.---.>+.<++++++++.>---.>>+.<<<----.-.>++.} 
http{ats.ucdavis.edu}




More information about the gradebook2-dev mailing list