View Full Version : DTO's
27 Jun 2008, 6:17 AM
Its a real pain to uses DTOs to get our data into BaseModel. Is there anyway just to use POJOS and not have to use BaseModel and create DTOs? I previously used gwt-ext and used their gwt-plus library which let us use POJOs. Any thoughts on this or words of advice?
This is an interesting point. You should post it in the Gxt: Open Discussion (http://extjs.com/forum/forumdisplay.php?f=33) forum
30 Jun 2008, 8:35 AM
I have published a new tutorial (http://extjs.com/helpcenter/topic/com.extjs.gxt.help/html/tutorials/dozer.html) (very simple) that demonstrates using Dozer to convert any java object into model instances. Using Dozer, you can map your DTOs to Models and then automatically, convert to and from. You would use Dozer to "transform" the object being sent and received from GWT RPC calls. Take a look and let me know what you think of this approach.
3 Jul 2008, 8:48 AM
I think the bigger problem is need to maintain two sets of classes, and no ide support for writing getters and setters that access map properties (?) (string constants are alse error prone).
.. btw gwt rpc implementation sometimes has problems with adding classes to .rpc file which are returned from methods (it works fine if I add field of the same type to model class).
9 Jul 2008, 1:37 AM
The tutorial is nice and is helpful. But I agree that the main issue is related to the ModelData contract. Darell, this is unfortunately not the first post talking about it :
16 Jul 2008, 4:35 AM
I REALLY prefer this solution : http://extjs.com/blog/2008/07/14/preview-java-bean-support-with-ext-gwt/
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.