English 中文(简体)
3级建筑和 mvc 之间有什么区别?
原标题:what is the difference between 3 tier architecture and a mvc?

3级建筑和 mvc 之间有什么区别?

他们是一样的吗?

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

最佳回答

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.

资料来源:

问题回答

MVC是一种使UI代码更容易维护和测试的模式,在使用MVC模式时,可以对UI代码的较大部分进行单位测试。

以下是一篇详细描述MVC模式的好文章:http://martinfirster.com/eaaDev/uiArchs.html

3 级结构是一个完全不同的图案。 它将整个应用程序分为有意义的“ 组 ” : UI、 商业逻辑、 数据存储 。

因此, 3 级应用指的是应用程序中的所有代码。 MVC 模式是 UI 级别中使用的模式 。

这是一篇关于三级结构的好文章:http://dotnetslackers.com/arts/net/IntroductionTo3TierArcharture.aspx

欲了解更多信息,请访问Internet,

它们在某种程度上相似,比如:

  • 3 tier divides the whole app in: UI, logic and data
  • MVC divides the UI part in: view (kind of UI of the UI), model (data) and controller (logic)

但不同之处在于 分层之间是如何沟通的:

  • 3-tier: anything goes through the logic tier (a->b, b->c and c->b, b->a)
  • MVC: they communicate 2 by 2, in a triangular way. (a->b, b->c, c->a)

http://en.wikipedia.org/wiki/Multitier_architecture Briefly, in 3-tier architecture, presentation tier never communicates directly with data tier. In MVC, the relation among model, view, and controller is triangular. Two of three can communicate each other

在三级解决方案中,将UI与业务级别分开,以确保关注其外观和感觉的UI设计师不会与留待方案编制行业的大量编程混为一谈。

当许多人参与生产大型应用程序时,此架构 (三级) 至关重要。

The main difference between both is: A “tier” in this case can also be referred to as a “layer”. The three tiers, or layers, involved include: A Presentation Layer that sends content to browsers in the form of HTML/JS/CSS. This might leverage frameworks like React, Angular, Ember, Aurora, etc. An Application Layer that uses an application server and processes the business logic for the application. This might be written in C#, Java, C++, Python, Ruby, etc. A Data Layer which is a database management system that provides access to application data. This could be MSSQL, MySQL, Oracle, or PostgreSQL, Mongo, etc.

MVC 结构是三角的: 视图向控制器发送更新, 控制器更新模型, 并直接从模式中更新视图

首先,第一级是 实际部署,你的意思是 也许是分层, 监查和监查是演示层的框架,

我建议你尝试建立一个网络应用程序, 使用MVC和三层技术 来真正理解它们之间的差异, 我建议你用红宝石在铁路上使用, 加上一个牵引引擎, 因为铁路是最著名的MVC框架之一





相关问题
SQL Server - How many users do I *really* need?

I m setting up an application, and I m looking into purchasing a license for SQL Server. My question is pretty simple (though may have a complicated answer...) How many users accounts do I really ...

Object Graph / Persistence Question

I m currently working with an online application that requires multiple screens/steps in order to complete. The application domain is modeled using an object graph. Persistence to and from a database ...

Why does stack get truncated in Exception.StackTrace?

Why does the high part of the stack (in Exception.StackTrace) gets truncated? Let s see a simple example: public void ExternalMethod() { InternalMethod(); } public void InternalMethod() { try ...

ASP.NET MVC and Service Oriented Architecture

I would like to know how do i incorporate a feature like wcf within and MVC application. My current idea of the architecture is as follows: EntityFramework -> ASP.NET MVC (Views) ...