什么是MVC,MVP与放大器之间的差异;在编码C#条款MVVM设计模式 [英] What is difference between MVC, MVP & MVVM design pattern in terms of coding c#

查看:124
本文介绍了什么是MVC,MVP与放大器之间的差异;在编码C#条款MVVM设计模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们使用短语搜索谷歌是什么MVC,MVP与放大器之间的区别; MVVM设计模式,那么我们可能会获得一些网址的其中讨论MVC MVP和放大器之间的差异; MVVM设计模式理论上像

If we search Google using the phrase "What is difference between MVC, MVP & MVVM design pattern" then we may get few URL's which discuss the difference between MVC MVP & MVVM design pattern theoretically like

MVP

使用在通过一个DataContext结合是不可能的情况。
Windows窗体就是一个很好的例子。为了视图从模型中分离,需要presenter。由于视图不能直接绑定到presenter,信息必须传递给通过接口(IVIEW)的观点。

Use in situations where binding via a datacontext is not possible. Windows Forms is a perfect example of this. In order to separate the view from the model, a presenter is needed. Since the view cannot directly bind to the presenter, information must be passed to the view via an interface (IView).

MVVM

使用在通过绑定一个DataContext是可能出现的情况。为什么?每个视图的各种IVIEW接口被删除,这意味着更少的code来维持。
一些例子,MVVM可能包括WPF和使用JavaScript的淘汰赛项目。

Use in situations where binding via a datacontext is possible. Why? The various IView interfaces for each view are removed which means less code to maintain. Some examples where MVVM is possible include WPF and javascript projects using Knockout.

MVC

使用的情况下视图和程序的其他部分之间的连接并不总是可用(你不能有效地使用MVVM或MVP)。
这清楚地描述了一个网络API是从发送到客户端浏览器的数据中分离的情况。微软的ASP.NET MVC是管理这种情况下一个伟大的工具,并提供了一​​个非常清晰的MVC框架

Use in situations where the connection between the view and the rest of the program is not always available (and you can’t effectively employ MVVM or MVP). This clearly describes the situation where a web API is separated from the data sent to the client browsers. Microsoft’s ASP.NET MVC is a great tool for managing such situations and provides a very clear MVC framework

但我还没有找到一个单一的文章,其中有样品code一起讨论在理论上的区别。

But I have not found a single article which discuss the difference theoretically along with sample code.

这将是非常好的,如果我得到一个文章,其中讨论了这3个设计模式之间的差异(MVC,MVP和放大器; MVVM),与code沿

It would be really nice if i get a article which discuss the difference between these 3 design patterns (MVC, MVP & MVVM) along with code.

我想获得我的手3相似的 CRUD来源$ C ​​$ C 应用已经由这三种设计模式(MVC,MVP和放大器; MVVM)来实现。所以,我可以通过code和理解应该怎么写code这三种设计模式(MVC,MVP和放大器; MVVM)。

I'd like to get my hands on source code of 3 similar CRUD apps which has been implemented by these three design patterns (MVC, MVP & MVVM). So that I can go through the code and understand how one should write code for these three design patter (MVC, MVP & MVVM).

因此​​,如果该物品存在哪些讨论code会怎样看这3个设计模式不同(MVC,MVP和放大器; MVVM),那么请重定向我那篇文章

So if any such article exists which discuss how code would look different for these 3 design patterns (MVC, MVP & MVVM) then please redirect me to that article.

推荐答案

应该是一个很好的入门。在现实中,你所选择的平台也发挥你如何使用这些模式了很大的作用。例如,MVVM自然是适合于WPF,而MVP Windows窗体效果很好。 ASP.Net MVC是不言而喻的。

This should be a good starter. In reality, your chosen 'platform' also plays a large role in how you use these patterns. For example, MVVM is naturally suited to WPF, while MVP works well with Windows Forms. ASP.Net MVC speaks for itself.

这篇关于什么是MVC,MVP与放大器之间的差异;在编码C#条款MVVM设计模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆