Thomas are you saying that instead of having this in the interface:

sendRequest(GenericDto dto, AsyncCallback<GenericDto>);

I should have a different method in the interface for each DTO? i.e.:

sendLoginReq(LoginDto dto, AsyncCallback<LoginDto >);
sendGetStuffReq(GetStuffDto dto, AsyncCallback<GetStuffDto>);
sendUpdateFooReq(UpdateFooDto dto, AsyncCallback<UpdateFooDto>);

It would eliminate the need for a handler method (handleRequest()) in my 
serviceImpl, but that work would be replaced with the boilerplate of 
defining each method in the service/serviceAsync interfaces. I suppose that 
it separates the logic a bit better to do it this way.

Jens' idea of creating a Serializable marker interface/base class for all 
of my DTOs and then specifying that instead of Serializable, looks like it 
will resolve the issues with being too generic and causing GWT to generate 
too much JS. I've seen a lot of talk on this topic, so I knew what that 
error meant. I just wasn't quite sure how I was going to solve it 
(especially at 9pm ;).

I'll give these a shot today and see how they work. Thanks a ton for the 
input guys!

On Wednesday, August 14, 2013 10:22:19 AM UTC-4, Thomas Broyer wrote:
>
> It's still unclear to me why you can't have X methods on the same 
> service/async interface, each with its own request/response (whether to use 
> those encapsulations is another matter that Jens already dealt about)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to