It depends whether your data is "static" or is dependent upon a "parameter" 
of the place/activity. If it's static, I don't see it as a problem to make 
your calls from the view (and rules are there to be broken ;-) ). Or you can 
have an "initialized" flag on the view to tell the activity/presenter 
whether it has to do the work or not.
What I like doing is not presuming of the lifetime of the view (whether 
you'll have a new view each time or a singleton, or something in between 
[1]).

Also, disposable activities is not always the best match for your needs. I 
prefer keeping a "cache" in specialized objects, but you might prefer 
keeping it in the activity (as you say that your activity would be almost 
empty without it).

It's all a matter of balancing pros and cons, and choosing the right pattern 
for the job; and you don't have to stick to a single pattern for your whole 
app (for instance, we have one activity –among a hundred– that's not really 
disposable: if the current place is of the same kind of the previous one, 
we'll reuse the same activity rather than creating a new one).


[1] I'm thinking about caching views for a few minutes (or place changes) 
before disposing them, so that when, say, you switch back and forth between 
a list (master) and detail activities, you reuse the view; but if you don't 
use it for a while, then it's better to dispose it to free some memory.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/XKo2Lcy7Z0MJ.
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