开发者

ASP.NET MVC vs Winforms MVC [closed]

As it currently stands, this question is not a good fit for our Q&A format. We exp开发者_JAVA百科ect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

Why does MVC work so well in ASP.NET but not in (.NET) winforms?

There isn't an explicit MVC for winforms offered from Microsoft. However, I see people attempting to use one but they are a bit of a mess compared to ASP.NET MVC.


In my opinion it's due to the fact that there is a one-to-one relationship between the request from the browser and the controller that handles it, as well as the model and subsequent view that renders the model.

With Windows Forms, you don't have such a mapping. You can have multiple things that trigger an event, and you can have multiple views on the model. Because there isn't a request-response pipeline like there is in a HTTP request (one request, one response), you have to handle things like registering multiple views (something you don't have to do in ASP.NET MVC, there is one view, the one that is dictated by the controller), as well as multiple ways of indicating the same input on the controller (again, only one way in ASP.NET MVC, and that's through a request, although this is minor compared to the first point).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜