View Full Version : Spring/Hibernate and GXT deferred binding

3 Jan 2011, 2:31 AM
Hello. I'm a GXT newbie and a little confused.

Please, can anyone clarify the following consideration:

I read it is possible to work with deferred binding (via @BEAN annotation provided by GXT).
With deferred binding it is possible to work with POJO classes without extending them with BeanModel class.
So, it should be possible to work with beans coming from an ORM (hibernate, iBATIS, etc.)
More precisaly, I've beans coming from Spring + hibernate, and they have some java annotations like @Entity, @Id, @NamedQuery, etc. Can I manage them with GXT if I define a @BEAN annotated interface?

My question arises from the fact that I read several articles where people explains that it is necessary to define a DTO/VO, in order to transform ORM beans to ModelData beans that can be managed by GXT. I'd like to avoid DTO and making two beans (the first one in order to work with ORM, the second to work with GXT) for each domain object!!
Deferred binding should be the right way. Isn't it? Why so many people works with DTO? Am I forgetting something that deferred binding cannot provide? Which is the best choice, deferred binding or DTO?

Thank you


3 Jan 2011, 3:02 AM
To my knowledge, to work with GXT we don't need DTOs(not mandatory) we can directly work on JSON data which send by server to UI(GXT)

3 Jan 2011, 3:07 AM
I'm sorry. I forgot to write that I'm working with RPC!