MVMMapper or “How to easily implement MVVM without repeating yourself over and over again.”
In the recent past I have given talks about MVVM and talked to a lot of people about the inner workings of the pattern. One of the most heard complaints is the sheer amount of coding tasks that seem to repeat themselves over and over again. Implementing INotifyPropertyChanged, IEditableObject, mapping the Model to the ViewModel and back, adding Commands and oh boy, writing all the asynchronous method handlers. Let alone maintaining these.
On the web you’ll find many MVVM frameworks (ranging from light to scary) and many examples that take shortcuts and mix up the Model and the ViewModel. One of the solutions I have been giving for these worries consisted of a single sentence: “You might give it a shot to generate the ViewModel using T4 templates.” Every time I said this two things happened: 1. the other nodded (perhaps pretending to know T4) and 2. My brain started to get into gear thinking about how I would do that, knowing I would never do that. But this time the gears kept on turning so I decided to put my money where my mouth was. After many hours of experimenting, designing and coding I proudly present to you the first public version (still Alpha) of the MVMMapper.
Please read or better try the first tutorial and give me feedback.