MVP
Model-View-Presenter
To get the most out of my posts in the Model-View-Presenter category here, you’ll want to start with
- Chris Lowe’s excellent GWT MVP example, which utilizes David Peterson’s excellent frameworks
- gwt-presenter and
- gwt-dispatch
The GWT MVP and related concepts I’m most excited about are:
- Each view implements an interface defined in the presenter, which improves code organization and testability.
- The event bus (GWT HandlerManager) allows views, widgets, and services to collaborate in a highly decoupled fashion. The ability to create custom Events and EventHandlers in GWT 1.6+ is extremely powerful.
- The notion of a PlaceRequest as implemented by gwt-presenter simplifies navigation and browser history management.
- The Command pattern as implemented by a dispatcher service in gwt-dispatch cleanly enables features like undo and provides a hook to easily pass a security token and other parameters with every service request.