How to minimize the amount of code downloaded initially by GWT app user's browser? Well, just wrap potentially big operations in a GWT.runAsync() call. However, since our application is using GWT best practices (dependency injection, MVP pattern), it’s not as straightforward as GWT doc describes. Could you please give me an idea on how to use code splitting in conjunction with GIN?
Asked
Active
Viewed 2,467 times
2 Answers
3
Follow this thread on the GWT mailing list. Use AsyncProvider as provided by the following enhancement.

Valdis R
- 2,095
- 1
- 18
- 36
-
1im using the GWT-Presenter Framework. brief the binding is done in this way bindPresenter ( Presenter.class, Presenter.Display.class, View.class); what should i do to optimize my code? my binding code should it be something like this? bind (Presenter.class). in (Singleton.class); bind (Presenter.Display.class). toProvider (asyncProvider); – user405458 Jun 17 '11 at 14:25
1
The best idea, I think, is to use MVP framework. I worked with mvp4g, it supports code splitting out of box. It will also generate boilerplate code for you, so it's pretty simple and fast to develop advanced GWT application with it. The other is gwt-platform, Google invited its creator to Google IO and it looks that this framework is preffered by creators of GWT.

beastieboy
- 91
- 1
- 3
-
1I already use GWT presenter but apparently it does not support code splitting So what do you recommend?do i have to migrate the application using a different framework(gwt-platform...) if so what is the framework that requires less effort? – user405458 Jun 17 '11 at 14:07
-
1Gwt-presenter is a simple reference implementation of MVP. It's not a real framework. Just few classes and interfaces. It doesn't support code splitting. There's a lot of boilerplate which you'll have to write if you decide to stick to it. Gwt-platform is a gwt-presenter fork, so it should be simple to migrate. – beastieboy Jun 20 '11 at 13:36
-
1Side note: the author of GWT-Platform (GWTP) is now working at Google... AFAIK, so is the creator of MVP4G. Both are fine frameworks. And apparently, both ease the code splitting process (in GWTP, you just have to use an annotation on the presenter). – PhiLho Jan 24 '12 at 12:33
-
Oh really? I think the GWT navtive MVP somewhat overlaps to GWTP or MVP4G. – Mike Oct 09 '12 at 07:52