I intend to build application with Winform and I would like to use MVP pattern.
Since I have never used MVP pattern before, I am not sure how to structure the new project.
Should I use same convention as in ASP.NET MVC like creating in the project separate folders for Models,Presenters and Views, then maybe using naming convention for Presenter classes so that their name ends with word "Presenter" (the same way the names of controllers in MVC end with "Controller")
Or should I create separate projects for Presenter and Model?
Honestly, this is a very subjective question. The way I am doing this today may not be the way I do this for the next application. It simply works out well for me. Also, what works for me may not be the way anyone else would do it - not that mine is wrong, better, or worse.
Naming conventions will help:
Also, I have separated my current solution into 3 projects:
Now, the only piece of the solution that I need to reference for unit testing is the PresentationModels project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With