GWT state management across multiple page/modules.

538 views
Skip to first unread message

AndrewG

unread,
Oct 2, 2009, 12:51:00 PM10/2/09
to Google Web Toolkit
I tried posing this before - no luck - so I am trying again.

I am looking at modifying a (largely) JSF-based web application to use
GWT. I have done some preliminary experiments which have been quite
successful so far - in providing a richer UI and better user
experience.

The main issue that I see at the moment is that the current
application has approx 100 pages of one sort of another (many are
light-weight - but not always simple - 'popup' editor forms for back-
end data).

The structure of the UI - redesigned for GWT - would be a bit
different - making use of being able to dynamically switch page
content - rather than using a reasonably big web page hierarchy.

Given the number of features to migrate - the final structure and
migration path are a bit of a concern.

Common sense suggests that it may not be a good idea to try to produce
a gwt 'monster app' module containing the whole UI - but instead make
it more modular. Current thinking is that the new design should
consist of a number of different pages - each containing the
equivalent functionality of perhaps 5-10 of the original web pages. A
horizontal main menu at the top would allow switching between these
pages - each of which would correspond to a different set of app
functionality - built into a gwt module.

Each gwt 'mini app' module would run on its own web page - so none of
these would be too large - and they could be developed one at a time -
and integrated into the existing app - replacing the corresponding set
of old jsf-based web pages.

I have tested this for two of these 'mini-apps' modules - and it works
quite nicely. The obvious problem going forward is how to track/manage
state in each of these modules when users navigate between them. For
example, the 'current' page might contain a series of trees/tables etc
- and the user navigates away from the web page hosting that app/
module - and then back again - it will not be in the state that he
left it (but in its fresh state).

There are obviously a number of different ways to tackle this (from
client side cookies to server side backing beans, etc) - but is there
a 'proper' way to do it within the context of gwt - ie one that the
gwt framework is designed to support easily ? - I suspect that there
ought to be - but I have only just started with gwt - so not sure
myself.

Any informed opinions would be appreciated.

thx

Andrew

jd

unread,
Oct 3, 2009, 3:15:40 PM10/3/09
to Google Web Toolkit
Hi,

I believe what you are after is Code Splitting
http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting

This is in trunk now and will be included in the upcoming 2.0
release. I am using it in trunk now and it seems very stable.

If you're not willing to move to trunk or wait for the 2.0 release you
could try using the "window name hack" where you can store large
amounts of data between pages serialized in the window name.

John
Reply all
Reply to author
Forward
0 new messages