A Well Earned Respect for History
One of the major peeves of using AJAX-based applications is that they tend to lose functionality provided by the browser back button. With GWT, history gets its respect. GWT provides a hook for your application to respond as it pleases to browser back and forward events.
The following listing of HelloHistory.java shows a
HelloHistory composite widget implementing GWT's
public class HelloHistory extends Composite implements HistoryListener
public void onHistoryChanged(String historyToken)
String token = History.getToken();
if (token != null)
When users of your application press back and forward buttons on their browsers, you get a chance to respond to it in the
onHistoryChanged() method. You track history with
tokens; you add tokens to the history as you see fit; and then you rely on these tokens to perform appropriate processing in the
A New Application Platform?
What Google has done with GWT is provided the power to develop Web-based, fat client-caliber applications that don't rely on the ubiquitous Windows operating system. An opening salvo for platform turf, perhaps?