How to do test development with MVVM
How do you create WPF MVVM apps and test-first custom controls ?
I find myself writing wicked amounts of XAML with DataTemplates before I even get to unit testing my view models. Do I have to design the whole viewmodel system before even writing XAML for it?
Any help was appreciated.
+2
a source to share
1 answer
If you are writing your XAML and data templates first, it looks like you are already coding the user interface. But MVVM provides a clean separation of UI and business logic (i.e. your business logic should be completely separate from your UI logic). So to answer your question, yes, you must first develop the view model and model first, and unit test before implementing the view.
+2
a source to share