On Thursday, May 26, 2011 6:48:03 PM UTC+2, tanteanni wrote:
>
> thx but guess before i opened this thread :-).
>
> the problem with all the tutorials/blogs/threads about places and 
> activities is, that they all try to link themself to "mvp" and they all 
> use/recycle simple mvp examples.


The problem is that many (including the official GWT documentation 
unfortunately) describe activities as an MVP framework, which it is 
absolutely *not*!
 

> (ok your articles try to show/mention the difference) but the main problem 
> is there is no example that shows the purpose of places/activitie(and their 
> managers) - examples that shows history handling /switching between places/ 
> starting activities and so on.
>

Have a look at the samples from the GWT distribution. The Expenses sample is 
hard to follow, but the mobile web app should be easier to understand: 
http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/
See also http://code.google.com/p/listwidget/ (by Googler –and GWT Developer 
Advocate– David Chandler).
David has good presentations about Activities at 
http://www.slideshare.net/turbomanage (he might have talked about it at I/O 
too, so have a look at the slides and videos there) and, finally, someone 
put up a diagram that shows the interactions (a bit specific to *one* way to 
use activities, but might help understanding 
anyway): 
https://groups.google.com/d/msg/google-web-toolkit-contributors/I418617UCH0/Vla70cXmE3cJ
(see for instance http://www.slideshare.net/turbomanage/whats-new-in-gwt-22 
starting 
at slide #38, and 
http://www.google.com/events/io/2011/sessions/high-performance-gwt-best-practices-for-writing-smaller-faster-apps.html
 starting 
at slide #23)

in my case i thought i could begin using activities/and places right after 
> reading about it (like i did with all mvp article) but at starting to use 
> them i am stuck and confused about what should/is a good relation between 
> activities (should they play presenters role?! when/when not),


It depends, but most of the time it's OK to have the activity play the role 
of a presenter.
 

> places (should each tab (in my case) be an place )...


No, the place is a kind of "global application state" (really, it's just a 
URL under another name –because it does not necessarily show in the URL / 
push items to the browser history, if you don't use the 
PlaceHistoryHandler–); or are you misusing the term "place" for "display 
area" or "panel"?

if a tab would be one place with 3 display areas - how many 
> activities/presenters should be there?
>
> i guess most of this question would be answered by an example that uses 
> those concepts the way they are intended for?!
>

…until you try introducing a "tab layout" into the game… because tabs, by 
definition, break linear navigation, so they oviously don't play well with 
"browser history" and "global application state".

Places are about navigation, so the first step is to thin about your 
"screen" as the result of accessing a URL; you must be able to "name" "where 
you are" at a given point in time (I'll let you struggle doing this with a 
"tab layout"), and this is your Place. Activities are a way to *handle* 
navigation and place changes, each time you change place, you potentially 
start a new activity (ending the previous one); but you won't change 
activity without changing place.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to