Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Why is the mvvm pattern good for winforms?


Asked by Stevie McIntyre on Dec 08, 2021 FAQ



Please Sign up or sign in to vote. It's a pattern like MVVM but for WinForms. The MVVM pattern is in favour of WPF/Silverlight developers because of its advantages. Microsoft says that MVVM: Separates the business and presentation logic of the application from its UI, and makes it much easier to test, maintain, and evolve.
Accordingly,
MVVM separates the view (your form) from the viewmodel (your logic). The reason it can be done in WPF is because WPF allows loosely coupling the view from the viewmodel via databinding in xaml. This allows the ViewModel from not knowing anything about the view and still being able to function.
Also Know, The Model-View-ViewModel (MVVM) Pattern is a design pattern. Per definition a design pattern shows a common solution in the object-oriented world and this solution can be applied in various platforms (WPF, WinForms, Java Swing, etc.). I agree that MVVM is best used with WPF because it leverages the strong binding capabilities.
Likewise,
Good luck! The Model-View-ViewModel (MVVM) Pattern is a design pattern. Per definition a design pattern shows a common solution in the object-oriented world and this solution can be applied in various platforms (WPF, WinForms, Java Swing, etc.).
In fact,
The DevExpress MVVM Framework allows you to utilize the Model-View-ViewModel design pattern in WinForms applications. If you are not familiar with this concept, refer to the What is MVVM and Why Should You Use It? section of this page.