This is tricky only in that everything in com.my.company.model (including
all params passed in to all methods) is serializable and meets the field
restrictions of GWT (
http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html#DevGuideSerializableTypes),
and remember to have a no-arg constructor.  The reason is that these objects
have to be instantiated as javascript objects on the client side, so it's
much more limited.

What is "upsetting" to me is that while you can mark fields as "transient"
so that they are not serialized, it seems you can't do it with methods or
constructors, or at least I've not figured out a way yet.

So, even if you just pass in a non-serializable param to a method that sets
your serializable fields normally, it won't work.  This makes it ugly in
that generally your server domain objects won't interoperate with GWT
objects, and you can't pass your non-serializable server objects to a GWT
serializable object's constructor to have it create the javascript object
with just those serialized fields.  It will still complain I suppose because
that constructor (or creator method if used instead) can't be used in the
javascript side.  So if there were a way to mark a method as not
serializable for GWT, that would help.

I'm still checking since that would make my code a bit cleaner if the server
domain objects didn't need to know anything about the GWT client objects.
That is, I don't mind the client objects knowing how to set themselves from
the server domain objects to then pass the data over RPC, as each different
client front-end can take care of itself, but it is sad if the server side
has to know the various client objects to create them for use by various
clients.

--~--~---------~--~----~------------~-------~--~----~
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