I'm newbie with GWT/GXT and I'm looking for best persistence way for my future apps. I was considering many variants of doing that so I decided to draw a graph here:
This is my personal opinion but I would like to know your opinion. Please explain me if I'm wrong and give cons arguments. I would really like to use Hibernate or maybe you know another ORM or similar to MyBatis framework that could give me direct mapping to the BeanModel.
For my purpose I'm going to develop app that would generate for me domain classes in BaseModel style with mappers, validators, editors, advanced search panels, DAOs, services and GWT-RPC classes. The best solution would be to develop own scaffolding :D. What do you think about it?
ya develop your own scaffolding..that's what i did. Here is my flow DB-> JPA -> Entity Beans -> My own Converter Class -> BaseModel
In my application the BaseModel is serving as the DTO. In the GWT RPC service i convert the BaseModel to Entity Bean and Entity Bean to BaseModel as needed.
-Zawoad
Maybe have a look at GWT RequestFactory. It's a new feature in 2.1
http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html
I personally use Gilead and have not had any problems with it, no major configuration necessary. I do not do much lazy loading of collections. I just designed my use cases with that thought in mind.
Has anyone tried to use hibernate's Dynamic Models, it looks like you should be able to map straight to the GXT BaseModel. See: Hibernate Dymanic Models Section
I used MyBatis with GWT and I was satisfied, because MyBatis uses only POJOs, so that objects are easyly transfered between client and server (no more DAO, DTO). You can use MyBatis's annotation if you don't like write XML mappers, I like its simple. So my recommendation is MyBatis
精彩评论