Multiple modules is the wrong way to use GWT.

GWT highly recommends using a single module. Most of the performance
optimizations GWT does relies on the fact that you have a single, monolithic
module. Plus, as you observed, the time to build your application keeps
growing as you add more modules, so it doesn't scale well.

Part of the problem is deciding whether you are building a "Web App" or a
"Web Site". Lots of
discussions<http://www.clyral.com/za/pages/web/website_vs_webapplication.html>can
be found on this topic.

GWT is great if you want to build a Web App. Typically, there is only a
single HTML page, and different "screens" are manipulated on the client side
using DOM. But if you are building a traditional, multi-page Web Site
(nothing wrong with that), then GWT is not for you. You are better off using
one of the many javascript libraries.

So, lets assume you decide you want to build a web-app, and want to use GWT
to do so. To get started, stick to a single HTML page with a single GWT
Module/Entry Point. Adding multiple "screens" is adding a new FlowPanel or
Composite with your content. Or perhaps, you have all "screens" built into
the original HTML page, and you just hide/unhide the divs based on user
action.

The above approach works well if you have a few (say less than 10) screens.
If your application grows bigger and more complex, you would want to start
following some established patterns. The MVP pattern has been touted as the
"way to build web-apps". Just do a google search, there are a lot of
articles on that subject. Also, catch Ray Ryan's talk on GWT Architecture
and best 
practices<http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html>.



--Sri


2009/11/13 David C. Hicks <dhi...@i-hicks.org>

> Specifically, I'm curious about the use of GWT Modules in a project.
>
> Each time we have a new "screen" to create, we have been adding a new
> module to our project.  Of course, with each new module, there is an
> additional build cycle to generate the Javascript for that module.  What
> I'm wondering is if this is normal, or does it make more sense to try to
> build up whole applications in a single module and perhaps keep the
> build time down?  Each new module we add appears to increase our build
> time by about 1.5 minutes.  It won't be long and this will be way beyond
> painful.
>
> Any thoughts?
> Thanks,
> Dave
>
> --
>
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=.
>
>
>

--

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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=.


Reply via email to