GWT Question

Suppose we have three entirely separate programming teams. Each team creates a separate web application using GWT. Each app (A, B, C) has its own Subversion repository, and follows its own release schedule. Version 1.2 of App A might be released in June, while Version 2.4 of App B is released in August. They are completely independent.

From a usability perspective, however, we don’t want to send people to three separate web sites to run each of these applications. Instead, we want one master “shell” application that has a row of three tabs along the top edge. (or some other GUI layout, the specifics are irrelevant). Clicking a tab reveals one of these apps.

Thus, we’d actually have four applications: The “shell” app, and apps A, B, and C.

What is the best way to accomplish this with GWT? As a relative GWT beginner, I don’t even know what to search for. I’d like the shell app to be relatively generic and independent, so we can plug in new apps over time.


Just thought I’d throw this out there. Why can’t you svn externals to bring A, B, C to the main app?

Chris Yunker Says:

I’ve just been getting acquainted with GWT in the last week. So take this with a grain of salt…

However, it seems like you’ve answered your own question. If you define your application at the top level as a Widget class, you can use a TabFrame or another layout panel to encapsulate all of your application Widgets.

(Disclaimer: I’m not that experienced with GWT at all.)

Are the requirements for the shell app such that it really needs to be a full-blown GWT app? What you mention about the the shell app sounds to me like it could be handled simply by a good old HTML frameset.

@Hugo: Yup, or something like Ext or JQuery tab controls.

Gabriel Says:

The simplest solution would be to use different HTML pages (or any web technology that generates HTML) where each page contains another compiled GWT application. A downside of this approach is that you serve three possibly big compiled JavaScript apps which contain the same GWT core content in addition to each application specific code. I would recommend trying to merge the three GWT applications into one GWT application in order to reduce the total download size.

robert cooper Says:

There are a few ways to do that.

First, the Shell app approach. If you want people to use all the apps a the same time, this is likely the best. You have to make sure your individual apps are set up with 2 different modules, one with the EntryPoint declared, and one without. The reason being, if you inherit from modules with entry points, all the entry points execute.

Perhaps the best way, as this would save your users download time, is to package your shell application, that inherits from all of the others, to launch each one as needed using the new .runAsync() call to their respective EntyPoints’ onModuleLoad() method. This would break the compiled JavaScript up so the only code you download initially is the shared code between all the modules (including the JRE implementations).

Leave a Reply