Answer the question
In order to leave comments, you need to log in
GWT - working with server classes?
There is a DAO layer.
There are classes in the gwt.client package that duplicate model classes from DAO.
How to properly, easily and naturally ensure their interaction during the request?
Those. when requested, turn the array of objects returned by the DAO service classes into an array of class objects from gwt.client, for use in the interface.
How to eliminate (or reduce) duplication of client and server code?
PS
I apologize for the confusion, if it's not clear, I'll try to rephrase the question.
Answer the question
In order to leave comments, you need to log in
Option 1 - RequestFactory. Requires satellite interfaces.
Option 2 (I choose this one) - all model classes are in shared, when objects are returned, they are run through the dozer. It has a special config for hibernate. In order not to resolve uninitialized collections, there is a special mapper in one line. I can give you the code.
Well, do not forget about the right patterns - MVP represented by gwt-platform, for example.
Maybe I didn’t quite understand the problem, but maybe this post of mine will help you: habrahabr.ru/post/154321/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question