Model View ViewModel ( M-V-VM )
February 15th, 2009 by TrilobyteRecently I have been working on a Windows Presentation Foundation (WPF) application designed to manage tasks. It is not the first time I developed an application in WPF. However, I was struggling with the same problem I was struggling with before:
The problem: Coupling my views (WPF) to my domain model (C#).
The solution I came up with back then is to make the domain model aware of the need to bind and implement specific functionality like [System.ComponentModel.INotifyPropertyChanged]. By doing this I cluttered my domain model with non domain model code, which made the model difficult to understand and maintain, basically: No Go!
The solution: Model-View-ViewModel pattern
I went out looking for pattern that could help me to eliminate this code cluttering. After doing some research using my favorite search engine I discovered that there was a pattern for this problem: Model – View – ViewModel (MVVM or M-V-VM).
Read the rest of this entry »