View Full Version : Pluggable UI

1 May 2008, 6:24 PM

Would like to receive any feedback about this concept/idea for an extension to Ext-GWT or GWT for that mater.

I'm looking for a way to completely abstract a UI module that can be auto-loaded (via JS file loading) as part of a pluggable framework to GWT development. :-?

ie you have an application with 200+ views and it can be broken into 5 sub-applications, yet you wish to have been seen as a distinct single application - current approaches are...

1) You build it as one single application - that is compiled by GWT into a massive 900K+ JS file. This has the downsides of being monolithic and hard to debug/test as a single app.

2) You build it as separate GWT modules - these are separate GWT mini-applications, each with their own entrypoint, but when compiled, produce a single massive 900K+ JS file. This has the downsides of being monolithic and the user is subjected to that large download, but offers simpler debug/test of separate modules.

What I'm suggesting is the development of a 3rd approach /:)

3) You build it as separate GWT applications that use a pluggable library framework that the main application can query and download JS designed to be integrated and interact with the main JS objects. This has the upsides of being trully plugable, offers simpler debug/test of separate modules and the download of the application is staged depending on the part of the application being viewed.

Does this seem worthwhile? Do ways to do this already exist? Am I smoking something that I shouldn't ????? :D

1 May 2008, 8:16 PM
There are a lot discussions about the monolythic nature of GWT apps on the forums. And there are some possible solutions.

I think to a certain extent you can achieve this goal by using a gwt-exporter type functionality - i.e. provide callable entry points to your modules from javascript and and then hook the whole ui using either pure javascript or JSNI based GWT module. Here is some discussion with projects that try to achieve this export to javascript functionality


The problem however will be with achieving a "tight" integration between your GWT modules. In other words, if you need to pass some data or behavior between your gwt modules you might run into issues (and come up with standard message passing mechanism). But I think "loose" coupling could be quite a lot easier...

I also remember that some folks mentionning that they just break up large GWT apps into modules loadable via iFrames - which might be another approach to the issue.

Regardless, I think having some kind of a standard "framework" that provides a variety of solutions to the problems could be quite useful.