Places and Activity – advancing MVP model

June 8, 2011 at 12:04 am Leave a comment

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.

[forum]

http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html

Advertisements

Entry filed under: Uncategorized.

Daily Mile API with GWT Converting my GAE application from JDO to JPA

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


@davidmbloom


%d bloggers like this: