GWT: what are the best practices for building a web2.0 interface with GWT?
gwt, java, web-applications
Solution
We identified the following high-level best practices for GWT 1.6/1.7 (just after 3 months of research and development):
- Use design patterns (MVC/MVP, Command for GWT-RPC, Composite for widget composition, Observer for event bus, etc.);
- Isolate application logic with MVP by abstracting out widget classes and views using presenter display interface and GWT characteristic interfaces (such as HasValue, HasText, etc.);
- Use dependency injection with gin on a client and Guice on a server (or stick with existing server framework like Spring);
- Use GWT Composite in combination with HTMLPanel to drive your views with html, css and MVP;
- Use mock testing based on isolation of application logic with MVP;
- Implement Event Bus with GWT HandlerManager;
- Use GWT modules to effectively optimize code compilation;
- Use client, shared, and server packages when organizing GWT modules;
Problem
I am no artist/designer so usually my GUIs well, you know... I've tinkered a bit with GWT and I was able to get sensible results but I feel I have used contrived ways of getting those results. If the community feels this question could help: please put one recommendation per answer.