views:

422

answers:

1

Which is a good architecture for a Web Application using OSGI and GWT as UI?

The aim is to use bundles to make bundles of web interface sections. If I add new bundle it will add new features (a menu for example) on the user interface, which cooperate with existing ones.

+2  A: 

Please see a similar discussion on the GWT mailing list - http://groups.google.com/group/google-web-toolkit/msg/4a3f912cb89a7256

To summarize - GWT's architecture is orthogonal to your requirement of multiple modules loaded at runtime. There are ways to achieve dynamic modules in GWT, but it is never going to be optimal.

In general, you would define a javascript interface for each of your modules, and then export those methods from GWT using GWT Exporter. Then you'd compile each of your modules independently. The modules will then interact at runtime using the javascript methods that you exported.

The price you pay is performance. Each module will duplicate common framework code (GWT + your own framework code), and there is nothing you can do to avoid it.

sri