Monday, September 20, 2010

Re: Organizing GWT modules

a. The final product should only contain what is actually used in the final module being compiled. However, I think you may experience longer compilation times if there is a lot of code not being used. I've heard stories of people seeing huge differences in compilation when inheriting incubator modules even when only using one or two classes.

b. It might make sense. On the other hand, if you stay in you're application after registration/login, you're going to need that other code eventually. If that's the case, you should look into code splitting with GWT.runAsync(). It's pretty straightforward, and the SOYC report will give you an idea of how effective your code splitting is.

-Brian

On Sun, Sep 19, 2010 at 1:37 PM, har_shan <harshan87@gmail.com> wrote:
Am starting a new GWT based project (and quite new to it) and
currently looking for ways to organize multiple projects (aka modules)
better (from js code size download perspective).

If a module A depends on module B (of course, i have to inherit it)
and if module A is gonna use only very limited client classes in
module B,
a. While compiling module A does *all* of module B classes will be
compiled and stored in a js and hence resulting in unnecessary code
being downloaded? I hope not :)
b. If above is true, does it make sense to split module B into 2 or 3
logically (if possible) so that i depend on a module and depend on
most of it. My concern is this is resulting in quite a lot of modules
being required for my project and i want to make sure that am not
doing something unneeded.

Here is an e.g.

Modules:
1. appln-model-core      -    Model contract interfaces
2. appln-model-impl      -    Model impl

Say am inheriting above modules in login/registration page that
require only user related stuff but above modules will have entire app
model classes

So is this needed:

1. appln-model-core
2. appln-model-user  (i only need this!)
3. appln-model-other
4. ..

When i extend this, my app seems to require lots and lots of modules.
Please throw in your suggestions. Thanks much.



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


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

No comments:

Post a Comment