AppEngine Datatransfer
I am trying to transfer data in the form of objects between a gwt client and the app engine server. The objects i transfer need to be persistable (a blog comment for example). as it turns out AppEngine is uncomfortable to include those persistable objects (annotated as @PersistenceCapable) in the gwt module, because the gwt client cant store such date. Also the gwt client cant call a remote procedure with objects which are not concrete. So there is not the option to define interfaces for accessing those classes.
In short: GWT Client cant work with interfaces, but also not with persistable annotated classes.
My Question is:开发者_如何学编程 how can i design an application which transfers stored data between the gwt client and the appengine. This is currently a real problem for me. it seems to me as if the only option is a DataTransferObejct which is just pure sensless code doing the exact thing the data-objects do: storing data.
I used the appengine.datastore Key for the id's of the classes.
Any suggestions ? Or am i getting something wrong ?
What version of GWT are you using? I regularly share data between GWT and GAE using serializable POJOs annotated PersistenceCapable. If you are using Key key, use Long id instead to get it working.
精彩评论