MVC/MVP framework for .NET WinForms applications
Solution 1
Microsoft has the Composite Application Block (CAB) for use with WinForms applications. While not technically an MVC/MVP implementation, it does provide nice separation between UI code and non-UI code: http://msdn.microsoft.com/en-us/library/aa480450.aspx
It is also fairly popular to just do it yourself without using any frameworks as long as you are comfortable with the relevant patterns. Jeremy Miller has an excellent series of articles on some best practices when taking this approach:
Build your own CAB Part #1 - The Preamble
Build your own CAB Part #2 - The Humble Dialog Box
Build your own CAB Part #3 - The Supervising Controller Pattern
Build your own CAB Part #4 - The Passive View
Build your own CAB Part #5 - The Presentation Model
Build your own CAB Part #6 - View to Presenter Communication
Build your own CAB - Answering some questions
Build your own CAB Part #7 - Whats the Model?
Build your own CAB Part #8 - Assigning Responsibilities in a Model View Presenter Architecture
Build your own CAB Part #9 - Domain Centric Validation with the Notification Pattern
Build your own CAB Part #10 - Unit Testing the UI with NUnitForms
Build your own CAB Part #11 - Event Aggregator
Build your own CAB Part #12 - Rein in runaway events with the "Latch"
Build your own CAB Part #13 - Embedded Controllers with a Dash of DSL
Solution 2
Have you tried MVC#? I started using it a while back, but the project fell by the wayside, so I can't vouch for it to much - sorry!
EDIT: I just found this article which looks pretty good too.
Solution 3
We use the Smart Client Software Factory from MS. It provides IDE integration, full MVC support and once you get over the concepts behind it is a very competent implementation. You can acquire it from: http://msdn.microsoft.com/en-us/library/aa480482.aspx
Alexander
Updated on June 14, 2022Comments
-
Alexander almost 2 years
Does anybody know a useable MVC/MVP framework for enterprise WinForms applications?
Before there was User Interface Process Application Block for .NET. But it is not longer under development since Windows Workflow Foundation has been released (which also will be completely rewritten with .NET 4.0).
Maybe i am not up-to-date, but i seems to me like there is a gap at the moment.
-
Marcel over 13 yearscodebetter.com seems down. Hopefully only today!
-
IsmailS over 13 yearsIs there any example code of what said in this series? I'm sorry if they are linked in the same article and I've missed it.
-
Roman almost 12 yearsFWIW, MSDN documentation now states Retired Content This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies.