Sending persisted JDO instances over GWT-RPC -


I still started learning Google Web Toolkit and finished writing the Stock Vector Tutorial app.

My thinking is correct that if someone wants to release a business object (like stocks) Using and sending JDO to the customer < / Strong> On RPC, someone has to create two different classes for that object : with the JDO annotation to continue on a server and the other that is CRiResable and used on RPC?

I have seen that stock watter is different classes and why can I learn:

  • Otherwise, like GDi Compiler JDO and com.google.blah.users.User, etc. For the referred class, everything will attempt to generate JavaScript.
  • In addition, there may be a logic on server-side class that does not apply to the client and vice versa.

I want to make sure that I understand it correctly. I do not want to create two versions of all my business object sections, which I do not have to do if I do on the RPC.

The short answer is: You do not need to create duplicate classes .

You can take a look at the following Google Groups discussion on the gwt- contributors list:

Here's an interesting excerpt:

< P> If this is what you are interested in, I have told GAE and GWT-RPC one way to work together "out of the box". Just declare your institutions like this: @Parisance Cap is applicable (identification type = identification type. APPLCation, Detachable = "Fotal") Public Class MePoos serializable {}

and everything will work , But you have to deal with it again manually when sending objects from the client back to the server - compression.

You can use this option, and you will not need a mirror (DTO) class. You can try (formerly hibernate4gwt), which takes care of some details within serializing problems of enhanced objects.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -