I have build my GWT project upon an MVP architecture. In that, "model"
objects are transferred between the server and the client. It is
tempting to just add "@PersistentCapable" to the model classes in
order to be able to store them directly in datastore. Is that a good
strategy?

My concern is: as far as I understand the model objects are
automatically stored if they have been modified before
PersistentManager.close(), so if the answer to the above question was
"yes", does that mean that I should really be aware and paranoid of
what model objects I receive from the client? It suddenly seem to be
beyond my control what will be auto-stored. They could potentially
screw up the validated model objects in the datastore if the server
receive an altered model object from the client and call
PersistentManager.close() without validating the received object. How
can I avoid that?

Example:
  1) A model object is received from datastore
  2) It is send to the client which alters it
  3) The client sends the altered object to the server
  4) What happens to it back on the server? Is it still attached to
the PersistentManager?

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

Reply via email to