At the time of creating the Windows Phone 7. application, using the MVVM template, with which we struggled to deal with the template or technique in order to centralize the navigation logic that will correspond to the MVVM.
To give an example, each time the application. our web service is calling, we verify that the input token we assigned to the application. had not expired before. We always return the status to the phone from the web service, and one of them can be Enum.AuthenticationExpired.
If we get that, I think, we would warn the user and return to the login screen. (this is one of many examples of status that we could get)
Now, wanting to keep things DRY, such logic seems to have to be in one place. This is my question.
How do I go on to simulate navigation that relies (essentially) on a switch or operators to tell us where to go to the next without repeating this in all views.
Are there any recognized patterns or methods that anyone can recommend?
thanks
source share