Sunday, March 31, 2013

Re: Replacing classes during custom serialization

As a second question, is there any document anywhere which describes
how custom serializers actually work? The tiny section in
DevGuideServerCommunication is not helpful. Some basic questions:

* Are custom serializers server-side only? Or do they get executed on
the client-side too?

* What's the relationship between the static methods and the instance
methods? I presume we have both for some sort of historical reason,
but can we get rid of the static methods? (last time I tried it didn't
work)

Jeff

On Sun, Mar 31, 2013 at 4:49 PM, Jeff Schnitzer <jeff@infohazard.org> wrote:
> When doing custom serialization, is it possible to swap out one class
> for another?
>
> This would fix a _lot_ of problems using Objectify's Ref<?> and Key<?>
> client-side, including, I think, being able to instantiate Refs and
> Keys intelligently.
>
> But I have an immediate problem I'm trying to fix - which is that
> Ref<?> is a class hierarchy on the server side, but I'd really like to
> simplify this to a single concrete Ref class client-side. So even
> though the sever might return StdRef<?> or NullRef<?>, these should be
> converted to a simplified, concrete Ref<?> on the client side.
>
> Is this possible? It would be even better if I could somehow just
> define one custom serializer that handles all Ref subclasses instead
> of having to make separate custom serializers for each.
>
> Thanks in advance,
> Jeff

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment