More Adventures in MVVM
Yesterday, I gave my MVVM talk to the public for the first time in Flint, MI. I will be in Southfield next week and Tennessee the week after that (CodeStock), giving the same talk. Although I have some changes to make, I thought I would post what I presented last night. I will probably work on a smaller example that I will also put up here when I am done with it.
The demo is a front-end to a recipe database. It should compile and run out of the box. It was designed to work against www.eCuisine.com, but it requires you to sign up with them in order to get real data. To get around that, I have stored some “canned” recipes in the service by default. If you want to hook it up to use the real eCuisine.com service, simply register with them from www.eCuisine.com and add your email/client ID in the eCuisine.svc.cs file and uncomment the null for the service. If you don’t do that, everything still works well enough for you to get the feel for the app.
The vast majority of the UI behavior exists in the View-Models and I show a few different approaches to getting View-Models hooked up to the views.
There is also a full suite of tests. Be sure to check them out for ideas to how you might test your View-Models.