Tuesday, April 24, 2012

Re: best/good practices to keep Model in sync with Activity/Place and a view.

for example a showUserPlace and a EditUserPlace. Or in general there are often more than one usecase per "model". And if i want a distinct url per use case i need different places. This cases could probably solved by let one "userActivity" manage two presenters (edit and show user). But then i have the same issue- how to "inject" the synchronized model from activity in presenter.
But at the moment the problem is not that two activities. Now i have a very complicated logic on the model so i decided to put this logic out of activity/presenter (ui handling logic). here is the same problem how to let the activity interact with a model. (i linked the concrete problem above - for short: if used events i have the problem to register for an event and trigger an event(asking the model) all in start method seem to fail)

On Tuesday, 24 April 2012 20:26:41 UTC+2, Jens wrote:
Do you have a concrete example? So far I never stumbled upon a case where I was thinking "hmm thats the same as in the other activity".
In general two activities should do two different things, so if I have for example an userId inside my place then the first activity would maybe fetch the User model class to display general user information (not needed relations would be null) and the second activity would fetch something different based on the userId.

-- J.

--
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/-/oCHDPpwZu2gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment