Elegant handling of user experience when new GWT application is deployed.

59 views
Skip to first unread message

DrG

unread,
Jan 8, 2013, 12:16:54 PM1/8/13
to google-we...@googlegroups.com
Is there an elegant solution to handle when a new release is deployed while you are in the GWT app?  E.g. we want the application to notice a new version of itself and automatically do a full page refresh?

Ideas?

Thomas Broyer

unread,
Jan 8, 2013, 12:38:29 PM1/8/13
to google-we...@googlegroups.com

On Tuesday, January 8, 2013 6:16:54 PM UTC+1, DrG wrote:
Is there an elegant solution to handle when a new release is deployed while you are in the GWT app?  E.g. we want the application to notice a new version of itself and automatically do a full page refresh?

Ideas?

The way Google apps (Groups and Reader at least, and I believe GMail too) work is they detect the new version the next time they talk to the server (IncompatibleRemoteServiceException for GWT-RPC for instance, which is used here in Groups, or other means) and display a notification in the app containing a "reload" link.

Wrt UX, I would consider automatically reloading the app a bad practice. It could be done in browsers that let you detect when the app is in the background, but you'd still have to be sure that I don't have any unsaved data and for best UX restore the exact same screen: same scrolling position, same open/closed items, same focused widget and element in list, etc. In the end, just let the user reload, it way much easier and he knows there'll be side effects.

Chak Lai

unread,
Jan 8, 2013, 1:41:48 PM1/8/13
to google-we...@googlegroups.com


On Tuesday, January 8, 2013 12:16:54 PM UTC-5, DrG wrote:
Is there an elegant solution to handle when a new release is deployed while you are in the GWT app?  E.g. we want the application to notice a new version of itself and automatically do a full page refresh?

Ideas?


In the project I am working on: 

If new version is detected, store the state of the application locally in browser as cookies before refreshing the page. 
When the page is refreshed, read the cookies and restore the state of the application, and then delete those cookies.


Stephen Haberman

unread,
Jan 8, 2013, 2:03:19 PM1/8/13
to google-we...@googlegroups.com

> > Is there an elegant solution to handle when a new release is
> > deployed while you are in the GWT app?

I thought through some of this awhile ago:

http://draconianoverlord.com/2010/07/07/gwt-seamless-upgrades.html

> IncompatibleRemoteServiceException for GWT-RPC for instance, which is used
> here in Groups, or other means)

Interesting. It looks like Groups doesn't use type name elision? I see
some FQCNs like java.util.List, but not as many FQCNs as in our
non-type-name-elided messages.

Makes me wonder if Google shares serialization policy files cross
builds?

This seemed kinda tricky to setup in an intelligent way (would want to
ignore CI/non-production serilalization files, wouldn't want to keep
them forever, etc.), so currently I don't share policy files across
builds.

Which means I can't use type name elision (well, without more forced
refreshes, vs. when-they-feel-like-it refreshes).

- Stephen

Reply all
Reply to author
Forward
0 new messages