Navigation in a MVVM Based World

While writing my latest metro styled app (I really hate that phrase), I found myself needing to do Navigation in a way which preserved the separation of concerns in your run-of-the-mill MVVM setup. I’ve seen plenty of different techniques for doing Navigation across the internet but none have had this “purity” that I’ve been searching for. I’ll explain:

One of the most novel techniques I saw in my searches was wrapping the Navigation Service and exposing it to the View Model. This had the neat side effect of making Navigation mockable. All is good, right? Well, not exactly. I think that wrapping Navigation seems to solve a problem which shouldn’t, and doesn’t have to exist. The View Model should have no concept of Navigation.

Read more…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s