Can the MVC Design Pattern / architectural pattern be used in Desktop Application Development?

偶尔善良 提交于 2019-12-04 13:35:06

问题


I've just learned what ASP.NET MVC is and I'm wondering if the pattern is ever used in Windows Desktop application development?

I'm specifically looking at potentially trying to use it in a Desktop .NET application.

Please forgive me if this question is way out in left field in terms of how MVC is suppose to be used. I'm still trying to wrap my head around the details of it.


回答1:


MVC comes in many flavors, Marting Fowler discusses at http://martinfowler.com/eaaDev/uiArchs.html

Google returns quite a lot of interesting stuff for windows forms mvc also




回答2:


The Model-View-Controller Pattern works like a dream with "desktop" apps, as you don't have to worry about handling state information.




回答3:


Most definitely. Here is a list of MVC GUI frameworks.




回答4:


I don't rememer where I see a good example of MVC for descktop apps.
It was about a thermometer.
The model was the thermometer it self. A simple POJO with the current state of temperature.
The apps have several views and controllers of the thermometer.
The controllers calls the setters, and the views calls the getters.
To synch the app use the Observer pattern. The views subscribe to the model.
And the model notify all the views subscribed in each setter.

It was a very useful example for understand MVC.




回答5:


For others whom might be interested:

http://dotnetslackers.com/articles/aspnet/BuildingModelViewPresenterAapplicationsWithMVCFramework.aspx

http://www.mvcsharp.org/Getting_started_with_MVCSharp/Default.aspx



来源:https://stackoverflow.com/questions/305988/can-the-mvc-design-pattern-architectural-pattern-be-used-in-desktop-applicatio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!