MVC vs MVP in Windows Forms
60
94.5
May 18, 2010
Hello:
I am working on a Windows Forms .NET application (i.e. Winforms). Is MVC better or should I go with MVP?
Thanks and regards.
1,128
99.9
May 18, 2010
Hi,
First off, the MVP pattern has been retired (here), instead Martin Fowler has separated it into two new patterns called Supervising Controller and Passive View.
I am no expert in these patterns, I have however used Passive view successfully in many WinForms applications and is currently my preferred UI separation pattern for WinForms. MVC pattern, I think, is best suited for (state-less) web applications (although its possible to use it in WinForms).
One big benefit of using Passive View (and the reason that I use it) is that it makes your view very "dumb" which makes them much easier to test.
Tip: If you do decide to use Passive View, I would recommend that you take a look at Event Aggregator to decouple the view and the presenter even more, make your application much easier to extend IMHO.
Good Luck!