I am currently working on a MVVM WPF application and exploring different ways to implement the MVVM:
One View:
One View Model: In this approach, each View has a corresponding View Model. The View Model contains all the commands and the methods that handle these commands.
View Model with Commands Only:
Here, the View Model includes the commands, but the logic for handling these commands is placed in a separate class.
Single View Model with All Commands:
there is a single View Model that holds all the commands. The methods implementing these commands are placed in a separate Action class.
I am keen to understand the potential issues with these approaches and any best practices you might recommend. My goal is to ensure that the application is maintainable, scalable, and adheres to the principles of clean architecture.
Take guidance from other member
Nguyen Vung is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.