GWT Dispatch and Splitting Code

47 views
Skip to first unread message

Mike

unread,
May 28, 2010, 11:12:10 AM5/28/10
to GWT Dispatch
Hi guys,


So, I started work on my split point last days and I want to split
each Presenter instanciation.
Each Presenter, View, POJO, Actions and Results will be loaded only if
the user decide see the Presenter.

But, the gwt-dispatch is loading my Beans at startup. Really bad.

I have a model class called Contact. The Contact class is only used
inside ContactPresenter and ContactAction and ContactResult, and
ContactAction and ContactResult are only used inside ContactPresenter.

When I checked the split code, my ContactPresenter, ContactView,
ContactAction and ContactResult is listed on my split point 1. The
Contact class not.


Looks like that gwt-dispatch is doing some proxy at startup.
There's anything that I can do?


Split code generated by -compileReport
* br.com.example.shared.Contact::new
* br.com.example.shared.Contact_FieldSerializer::instantiate
*
net.customware.gwt.dispatch.client.service.DispatchService_TypeSerializer::registerMethods
*
net.customware.gwt.dispatch.client.service.DispatchService_TypeSerializer::
$clinit
*
net.customware.gwt.dispatch.client.service.DispatchService_Proxy::
$clinit
*
net.customware.gwt.dispatch.client.service.DispatchService_Proxy::
$DispatchService_Proxy
* net.customware.gwt.dispatch.client.DefaultDispatchAsync::$clinit
* net.customware.gwt.dispatch.client.DefaultDispatchAsync::
$DefaultDispatchAsync
* br.com.example.client.gin.CodeSplittingInjectorImpl::$create_Key
$type$net$customware$gwt$dispatch$client$DefaultDispatchAsync
$_annotation$$none$$
* br.com.example.client.gin.CodeSplittingInjectorImpl::$get_Key
$type$net$customware$gwt$dispatch$client$DispatchAsync$_annotation$
$none$$
* br.com.example.client.gin.CodeSplittingInjectorImpl::$create_Key
$type$br$com$example$client$mvp$Resource$_annotation$$none$$
* br.com.example.client.gin.CodeSplittingInjectorImpl::$get_Key
$type$br$com$example$client$mvp$Resource$_annotation$$none$$
* br.com.example.client.gin.CodeSplittingInjectorImpl::
$CodeSplittingInjectorImpl
* br.com.example.client.CodeSplitting::$onModuleLoad


Any help?

Philippe Beaudoin

unread,
May 28, 2010, 12:13:56 PM5/28/10
to gwt-di...@googlegroups.com
You might want to look at the way gwt-platform does code splitting and
apply similar ideas to your gwt-dispatch application. It's using gin's
AsyncProvider to put entire presenters behind split points and from my
(admiteddly shallow) analysis it seems to nicely code split actions
and model objects that are only needed in a presenter.

http://code.google.com/p/gwt-platform/

Cheers,

Philippe

federico

unread,
May 28, 2010, 3:56:34 PM5/28/10
to GWT Dispatch
hi phillippe
unfortunatly gwt-dispatch don't fit well with gwt code splitting look
at this thread
http://groups.google.com/group/gwt-dispatch/browse_thread/thread/cc0695bb0c994017/65634565c4891a1b

to me the solution it's related to this gwt bug
http://code.google.com/p/google-web-toolkit/issues/detail?id=2374



On 28 Mag, 18:13, Philippe Beaudoin <philippe.beaud...@gmail.com>
wrote:

Philippe Beaudoin

unread,
May 28, 2010, 4:08:55 PM5/28/10
to gwt-di...@googlegroups.com
Interesting... I will have to analyze my compile report again. I did
this a while back and it's possible I missed the fact that my commands
and model objects we not code split.

Thanks Federico! I've starred the issue.

Philippe

Mike S. Matsumoto

unread,
May 31, 2010, 3:35:25 PM5/31/10
to gwt-di...@googlegroups.com
all because this:

http://code.google.com/p/google-web-toolkit/issues/detail?id=4412
--
Mike Shigueru Matsumoto
Reply all
Reply to author
Forward
0 new messages