Its okay to have multiple modules for modularity. But it is not okay to
compile each of these modules separately and generate multiple .nocache.js.
And even if you have some reason to compile twice, nothing can justify
putting two separately compiled js files on the same html page.

GWT works best with a single html source page that loads just one
.nocache.js file. That way, it is able to perform a lot of optimizations.
You may want to go through this discussion
thread<http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c2774cb5c9b8851e/f3bc8275e6547b77?lnk=raot>.


History management works great with a single module. With multiple modules
on the same page, I don't know what it ends up doing... But you don't want
to go down that path.

--Sri


2009/11/30 rjcarr <[email protected]>

> "I want to split my GWT code into multiple GWT modules, compiling all
> modules
> separately and then linking all GWT modules (.nocache.js files) in a
> single
> page.* Is it a good practice?*"
>
> Sure, this is pretty typical, although there isn't much sense breaking
> things up if you only have one entry point.  I mean, it will still
> work, but unless you plan on using the modules in other places things
> will be simpler with just a single module (but by no means would it be
> considered bad practice to split things up).
>
> "Well, I already tried with two modules, both
> modules are working together without any trouble except one thing,
> they
> break browser's back-fwd feature."
>
> The number of modules in your entry point should have nothing to do
> with the back-forward functionality.  GWT is a web application, not a
> web page, and as such back-forward gets very tricky.  There is some
> history support available for GWT but I haven't bothered to deal with
> it much.
>
> On Nov 27, 6:48 am, Prashant <[email protected]> wrote:
> > Hi,
> >
> > I want to split my GWT code into multiple GWT modules, compiling all
> modules
> > separately and then linking all GWT modules (.nocache.js files) in a
> single
> > page.* Is it a good practice?* Well, I already tried with two modules,
> both
> > modules are working together without any trouble except one thing, they
> > break browser's back-fwd feature. I did some experiment and later I found
> > out that :
> >
> >    - When page is loaded first time, both modules' historyChageListeners
> are
> >    triggered as they should - *that's okay*
> >    - When a widget creates new history item (History.newItem(...)), only
> >    that module's, to which widget belongs, historyChageListener gets
> triggered
> >    - *is it a bug, i'm using GWT 2.0.0rc2 *- anyway, that works for me.
> >    - When I use browsers back-fwd button - only one module's (may be one
> >    which gets loaded first) historyChageListener gets triggerd - *is it a
> >    bug ? is there any workaround to make it work?*
> >
> >    Thanks
>
> --
>
> 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