3 层架构和 mvc 有什么区别? [英] what is the difference between 3 tier architecture and a mvc?

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

问题描述

3 层架构和 mvc 有什么区别?

它们是一样的吗?

两者都有 3 层,即模型、视图和控制器

解决方案

与MVC架构对比

<块引用>

乍一看,这三层似乎与模型-视图-控制器 (MVC) 概念;然而,在拓扑上它们是不同的.三层架构的基本规则是客户层从不直接与数据层通信;在一个三层模型所有的通信都必须经过中间层.从概念上讲,三层架构是线性.然而[模型-视图-控制器] MVC 架构是三角形:视图发送更新控制器,控制器更新模型,然后视图直接从模型更新.

来源:http://en.wikipedia.org/wiki/Multitier_architecture#Three-层架构

what is the difference between 3 tier architecture and a mvc ?

Are they same?

Both have 3 layers i.e model, views and controller

解决方案

Comparison with the MVC architecture

At first glance, the three tiers may seem similar to the model-view-controller (MVC) concept; however, topologically they are different. A fundamental rule in a three tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all communication must pass through the middle tier. Conceptually the three-tier architecture is linear. However, the [model-view-controller] MVC architecture is triangular: the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model.

Source: http://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture

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

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