What's the best way to create a web app with multiple entry points but
a lot of common code (eg. common widgets and dialogs) shared between
them, as well as a common server back end? Currently I'm creating
multiple modules and multiple HTML pages within a single web app but
I'm also worried about scalability. The different entry points
correspond to different workflows depending on what the user is trying
to do, or perhaps customised versions of the interface for particular
customers.
I guess I should probably have a single module and top level entry
point and then switch between interfaces from there but that will
involve a lot of code refactoring.
-Rolf
On Nov 14, 11:50 am, Sripathi Krishnan <
sripathi.krish...@gmail.com>
wrote:
> 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/GoogleWebToolkitBestPr...>.
>
> --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-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs
cr...@googlegroups.com>
> > .