I am still very confused about the enhanced serialized class "issue"
in GWT version 2.0.
I would like to use GWT for a CRUD application. One of the advantages
I can see over Flex, is the possibility to use shared entity java pojo
both on the client (detached) and the server. I don't want to use DTO
(even if there are generated with Dozer) or Gilead. The French book
"Programmation GWT 2" seems to say it does not work "as is" while
Google help seems to say the "issue" has been fixed in 2.0.
I know there is a solution called "objectify" for the App Engine but I
am using JPA/hibernate right now.
Thanks for your help.
GWT 2.0 will probably correctly serialize enhanced classes. But there
are case such as for List where Hibernate uses a PersistentBag to
implement List.
At that point, GWT will not be able to serialize/deserialize the class
containing the List field.
Is this right ?
Thanks
On Feb 7, 8:17 am, PierreR <p.radermec...@gmail.com> wrote:
> I can be a little more precise here.
>
> GWT 2.0 will probably correctly serialize enhanced classes. But there
> are case such as for List where Hibernate uses a PersistentBag to
> implement List.
Hibernate doesn't do "enhanced classes", or rather it does it "on the
fly". That's why (AFAIK) Gilead or similar solutions are needed.
If you wonder what "enhanced classes" then means, have a look at
DataNucleus: http://www.datanucleus.org/products/accessplatform/bytecode_enhancement.html
DataNucleus uses a simple ArrayList, which GWT knows how to serialize.
I just did a prototype with DataNucleus (JDO though, not JPA, but it
makes no difference in DataNucleus actually) and it "just works". I've
never used Hibernate in a "GWT context" though, so I cannot compare.
I've hence abandoned datanucleus for hibernate + gilead. Hibernate
supports JPA annotations as well along with some extentions. I am a
happy clam now :)
The current roadblock I see with GWt and the data model is the absence
of a data binding framework that I can use to bind POJOs to elements
such as grid/tree etc. If I find something that does that (and is
freeware), I'm going to send the author a box of chocolates.