Places and Activity – advancing MVP model
In this new way of doing MVP, we need an event bus, place controller , and a view.
Place: A place basically represents a certain state of your UI. The place is identified using a name. The place string you provide is bascially the history token that will trigger things such as a presenter to activate.
PlaceController: In charge of the user’s location in the GUI.
Activity: is analogous to a presenter in MVP terminology. Activities are started and stopped by an ActivityManager associated with a container Widget.
Activity Mapper: Returns the activity to run for the given place
ActivityManager: with a given place event, it associates a representative activity to invoke. Here you can start or stop activities where they are associated with a particular widget.
History: class that lets you interact with the browser’s history stack. The stack contains a list of tokens, which in most cases is a single string object.
PlaceHistoryMapper: attach all places which the PlaceHistoryHandler should be aware of.
PlaceHistoryHandler: updates the browser URL corresponding to each Place in your app.
PlaceTokenizer:a place to URL History mapping class
PlaceManager: Place managers acts as an abstraction layer between GWT history and gwt-presenter places. It just links tokens from the History path to specific Places and vise versa.
Entry filed under: Uncategorized.