WPF Design Patterns – Best Practices

design-patternsnetwcfwpf

Have a plain WPF that started a proof of concept got demoed and bought and went down that path for a couple years.

Time to start fresh and would like to know proper pattern.
A WPF app that will talk to a WFP Service with a SQL data store.
The crazy light colors are sliders and clearly will not keep those colors.

What is a proper design pattern?
From what I have read I think MVVM

Not totally following the comment on MVM MVVM but it would be nice to have more than one View. The people that code will have different priorities than a high level person that is mainly view.

enter image description here

Best Answer

With WPF applications always use MVVM as a design pattern because:

  1. SOC: Separation Of Concern, you get your code separated effectively, where you make adjustment in a code block without affecting anything else somewhere else.
  2. You Develop, Someone else design: by the elimination of tight coupling between the UI and the business logic you can develop your code without worrying about how the UI will look, you can even hand it over to a designer to take care of it.
  3. It can be properly tested: instantiating business logic from separated class than the UI will make testing easier and more effective.
  4. Take advantage of the associated interfaces: MVVM offers you the proper usage of two important utilities INotifyPropertyChanged and the ObservableCollection, that way you don't have to worry about the values changing or what data to update each time the UI makes changes to the data binding.