I think the original poster meant Application Domain Objects treating them as DTO's.
I had a similar issue on a previous large project. The Domain Objects were Hibernate Mapped too, with 1-N and N-N relationships. Not only did the JavaScript grow, the Serialization became a huge overhead and a mess. Typically, you just don't need your Domain Objects in the Display Layer. Most get transformed to table display, forms, drop-down lists, etc. Found it better to create a few simple generic Data Models ( TableDataModel ) etc, and to the transforms on the server. Also found that formatting ( Dates, Numbers ) to Strings for display was 2-3 orders of magnitude faster on the server also. Furthermore, the Domain Objects carried alot of "internal use data" that was useless for display, and once shipped to the client, could pose a possible security risk. Blindly copying the objects back from client to server, then persisting them is a hugely bad idea. NEVER trust the client. If you think about it, you likely only have less than 10 "Display Abstractions". You can then get away with that many or less DTO types ( Models ). The GWT generated Serializers will drop off dramatically, your JS code will shrink, and you can optimize the the hell out of the Widgets to do the display. To give you an idea, moving the Domain Object to TableModel transform and Date/ Number formatting from the client to server in my most recent project dropped table display time from 7 SECONDS to 0.8 seconds on IE6. I know it seems like a great OO Design gain to be able to use your Domain Objects right in your client code. Conceptually it is, Practically tho, it is full of problems. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
