After reading a while and watching Google IO videos, I am still confused on how MVP relates to Activity and Places.
I found a thread posted a while back --> GWT 2.2 MVP vs. GWT 2.1 Activities-Places
"MVP architecture. MVP is the concept, and one of the ways to do it is the places-activities framework"
I also hear "A presenter is analogous to an Activity"
We can gave "Activity and Places without MVP"
We can mix in "Activity and Places with MVP"
"MVP is nothing but how we organize our Project so that we can test and organize code easily"
Then I am trying to figure out stuff like this --> http://code.google.com/p/gwt-platform/
I am really confused. I would want a one stop thread to end all the confusion.
TL;DR: Places and Activities are in no way related with MVP.
Places is about navigating into your app: you go from one place to another. And Activities builds on top of Places to help in binding "what you see" with "where you are":
Each one of these "parts" (region) are managed by ActivityManager
s that listen to PlaceChangeEvent
s and ask their associated ActivityMapper
which Activity
to show in that region.
It's all about navigation.
There's no relationship with MVP (despite what the official docs say). If you use MVP though, you'll likely make you activities "presenters", in control of a "view" (the one the activity will pass back to the AcceptsOneWidget
received in argument to its start
method). This is not a rule though, and, for instance, Google is experimenting, in the mobilewebapp sample, with decoupling activities and presenters.