I am writing a WinForms application and want to have a "MVC-Type" project. Actually it is more MVP or MVVM ,.
The plan is to have a central controller that does all the actual work, so that the forms simply display the ViewModels and handle the user input, but everything that actually does something goes through the controller.
I'm just wondering, this is a good idea, and where to put the controller? The current idea is to have a static class that is initialized in Program.cs (sending some dependencies like IMyDatabaseRepository), so that it just remains a controller that delegates work between the user interface and the model.
As you can guess, I come from a web background and do not have much experience with WinForms architecture. Previously, my MainForm was a Controller class containing all state variables, which obviously means that my MainForm is my application, and not just part of the user interface.
source
share