MVC与3层架构 [英] MVC vs 3-tier Architecture

查看:134
本文介绍了MVC与3层架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我已经阅读了很多有关两者的内容,但仍然感到困惑. MVC和3-Tier都是山姆吗?如果是,那么为什么这两个存在,只是为了不同的命名?如果不是,那么两者的基本区别和主要区别是什么?

请回复(没有额外的链接,因为我已经用Google搜索过,但是没有任何用处).

谢谢.

Hi guys!!

I have read a lot about both, but still confused. Does MVC and 3-Tier both are same? If yes then why these two exists, just for different naming? If no then what are the basic and main differences in these two?

Please Reply(No extra links Please as I have already googled it but got nothing useful).

Thanks.

推荐答案

不,尽管它们确实有相似之处,但它们并不相同.正式地,在3层系统中,数据层与ui/表示层之间没有通信,两者都必须与逻辑/模型层/进行通信.拓扑是分层的:

演示文稿/GUI
------------------
逻辑/OM
------------------
数据访问


在MVC中,视图将信息传递到控制器中,控制器更新模型,然后模型为响应更新视图.拓扑为三角形:


    M
  /  \ nbsp; \
      \
C ----- V
No they aren''t the same, though they do have similarities. Formally, in a 3-tier system, there is no communication between the data tier and the ui/presentation tier, both must communicate with the logic/model tier/ The topology is layered:

Presentation / GUI
------------------
Logic / OM
------------------
Data Access


In MVC the view passes information into the controller, the controller updates the model, and the model updates the view for the response. The topology is triangular:


    M
   /  \
  /    \
C-----V


这篇关于MVC与3层架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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