Better way to handle this would be great.. 

Obvious response to this is "have unit tests to check if gwt-rpc works for 
each class". This gives a problem in complex object graphs with 
multiple descendants where some are meant to be used over gwt-rpc and some 
aren't, etc.

Having the compiler check every RPC async interface also isn't the right 
answer because of inheritance and other issues.

We should really have an annotation, something like '@GWT-Entity' perhaps, 
that could be tagged onto a class to mark it for use in GWT-RPC and would 
be validated by the compiler to make sure it is usable over gwt-rpc. It can 
be fully optional too, so classes without @GWT-Entity could still be 
serialized but generate a warning to tell the user the class hasn't been 
marked. So then it would be fully backwards compatible.

On Friday, September 14, 2012 5:06:16 PM UTC+2, Joseph Lust wrote:
>
> A number of times we've run into serialization exceptions with GWT-RPC. Of 
> course following the serialization policies for GWT-RPC to the letter can 
> prevent this, but not all of our devs are keen on these.
>
> Since the compiler sees every RPC async interface, and is compiling those 
> objects passed via the interface, is it possible to detect RPC 
> serialization issues at compile time rather than runtime when it is first 
> used? Seems like the compiler should be able to do this but I've not been 
> able to find a setting for it. That would save folks time and make using 
> GWT-RPC less error prone. Heck, adding it to the GWT Eclipse Plugin for 
> automated error checking would be even more useful.
>
> Thanks for any tips or tricks you may be able to provide. :)
>
>
>
> Sincerely,
> Joseph
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/tqMpaekRt-cJ.
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