On 21 juil, 10:15, xworker <
blomqvist.andr...@gmail.com> wrote:
> Hi Thomas
>
> Thanks for your reply, I have started to look into the ActivityManager
> and Place patterns, but have not found lots of documentation. Is there
> any examples?
You could look at the "Scaffold" app in bikeshed (in the SVN repo),
but it's a bit convoluted as it's code generated by Spring Roo.
The basic idea is:
- create activities, which will generally be your presenters; and in
the start() method, make sure you call the Display back with the view
(which should implement IsWidget); you generally do this in the
onSuccess of a GWT-RPC or RequestFactory call.
- create places, which can really by whatever you like (you'll be the
one responsible for instantiating them), you can make singletons, or
"parameterized" places (arguments in the constructor, and property
accessors).
- create an ActivityMapper to map places to activities (i.e. for a
given "screen region")
- create an ActivityManager with the mapper created above and the
event bus
- setup the activitymanager's display with a display that knows where
to show the activities' widgets (the "screen region", removing the
previous widget before adding the new one)
- call goTo on a PlaceController (created with the very same eventbus
as the activitymanager) to go from place to place
Repeat the ActivityMapper/ActivityManager/Display steps for each
"screen region" of your app. Keep in mind that a Place is
"global" ("where am I?") whereas an activity is the "response" to this
place in a specific "screen region".
> Is gwt-p going to be standard for 2.1 or will google release there own
> implementation?
There's no relation between GWTP and GWT (other than GWTP relying on
GWT). Activities and Places *are* Google's "own implementation".