I feel this approach has several advantages over the iframe approach
- as mentioned above, there is not repeated boiler plated code
- seamlessly works as a single app, where portions of the apps (i.e
the separate modules) are transparently loaded in chunks. Once loaded,
it is equivalent to the the whole all being loaded as a single JS GWT
can still behind the scenes to a MD5 check to see if JS module needs
to be refetched. With the iframe approach, there will be a "blank"
screen during the period a request to a new module is made
- related to the point above, application functions as a single app,
and not an integration solution. things like SSO work better.
Hi,
I implemented a solution for dynamic modules loading on runtime
without iframe and with a basic events framework to interact between modules.
There is a basic sample application here:
http://downloads.phenyx-ms.com/olivier/
You can look the html source, you will see 3 gwt modules, each gwt modules is
instanced on a tab and one module catch event from the *Panel* module.
As you can see, obfuscated code can be plugged together. Of course,
you lazy load modules.
If some one is interested, I'll see to publish the code and wiki ASAP.
Regards,
Olivier
2008/2/29, Sanjiv Jivan <sanjiv...@gmail.com>:
This is precisely what I was trying to describe :
http://glinden.blogspot.com/2008/01/optimizing-web-20-applications.html
> are you adding applications dynamically or are they all references from the HTML statically ?
Currently it's statically. But it's dynamic on the point of view of
OSGI plugins (eclipse equinox). You can develop modules on separate
osgi plugins , and at runtime, the main plugin will publish the
available gwt modules. In this way you have a dynamic modules
integration.
The second use case will the availability to access on each modules
from javascript. There is Registry interface to query/create/event the
available modules. This part is not completly implemented but it is
quite easy to do it.
Thanks,
Olivier
The IFrames are a very bad choice:
- Memory leaks (I posted a bug about this, including a fix, but nobody
seems to care about it)