>
> I don't want to put all the GWT modules in a single .nocach.js..
>
A single module doesn't mean a huge .nocache.js. GWT 2.0 introduces
developer guided code splitting. Using this approach, it is still one single
monolithic compile, but the output is multiple js files that get downloaded
on demand. It takes a bit to configure your app properly, but is worth it.
Search with the key words "GWT.runAsync()", "Story of Your Compile" or
"Developer guided code splitting" if you want to learn more about it.

..every time I add or remove a module, whole GWT code will be needed to
> recompiled
>
Thats true. As far as I know, there is no way around this. But its better
that you (=developer) spend 4-5 minutes at compile time rather than forcing
your user to wait an extra few seconds at run time.

Thirdly, it will load lots of redundant (GWT) modules which will slow down
> my app if more modules in future
>
I am afraid that is exactly what you are doing when you put two modules on
the same page.
Say you put two modules - alpha/alpha.nocache.js and beta/beta.nocache.js on
the  same page. Both these modules would use some common classes from the
JRE library. This common code will end up in alpha.nocache.js as well as
beta.nocache.js. There is no way to prevent downloading the common code
twice.
Doesn't stop there. GWT puts resources under the appropriate module folder.
So, standard.css would get downloaded twice - one for each module, even
though the standard.css is exactly the same.


--Sri


2009/12/1 Prashant <[email protected]>

> Actually, my app manages data/content in form of modules and each module
> has its own GWT module to help it add/update data. A module may or may not
> load depending on request, so, corresponding GWT module may or may not load.
> I don't want to put all the GWT modules in a single .nocach.js because I am
> not managing whole DOM instead just a piece of it and I cannot stick with
> single .html. Secondly, It will break the modularity of code, every time I
> add or remove a module, whole GWT code will be needed to recompiled.
> Thirdly, it will load lots of redundant (GWT) modules which will slow down
> my app if more modules in future. I hope, I made myself clear.
>
> I little bit modified my code, making it less history dependent. And, I
> guess (didn't tested), it works fine if I use (import) *History* with only
> one module (tell me if I am wrong). So, I can use history with my main
> module and keep other small/helper modules away from it.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to