I can't really remember gwt-dispatch as I use a custom command pattern and 
no framework..but in general the only thing you can do is to provide 
multiple dispatch services, e.g. one per application module. Each dispatch 
service would then use a different command base interface.

So if you have two app modules "mod1", "mod2" then you would have

- Mod1DispatchService(Mod1Command command, ...)
- Mod2DispatchServce(Mod2Command command, ...)

Inside mod1 you will always use Mod1DispatchService and commands that extend 
Mod1Command and in mod2 the mod2 counter parts. No cross references! So 
instead of one global generic dispatch service you will have several more 
specific ones. 

If you can't do that with gwt-dispatch then well..you have to live with the 
code size or get rid of gwt-dispatch.

Also make sure you do not use List or any generic interfaces inside your 
commands unless you really need to. This will also increase your code size 
as GWT will generate serializer classes for all implementations of List. 
BTW these generated serializer classes are the problem why you cant code 
split like you want to. The generated dispatch service contains a map with 
all types (all implementations of your base command interface) used in your 
service methods and their corresponding serializer classes. And because of 
that map every command will be in the initial download.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_SZEn2OdXPEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to