I’ve had to implement some features in our WPF-based UI using code-behind (and modifying the great view model classes implemented by my coworker that now supervises a large web-based project). I was digging for ways to move the code into the view model when I stumbled upon this article: http://blog.jerrynixon.com/2012/08/most-people-are-doing-mvvm-all-wrong.html

The guy puts is bluntly: “In order to offend the purists, I have to add this: sometimes you have to have code behind – even when you are manipulating the data. Reality is, you want to minimize it.  Fact is, you can’t always eliminate it. That doesn’t mean you should not try.”

I feel less guilty now 🙂

Advertisements