ASP.NET MVC和N层模型之间的基本区别是什么? [英] What is the basic difference between the ASP.NET MVC and N-Tier Model?

查看:81
本文介绍了ASP.NET MVC和N层模型之间的基本区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个人早上好!有谁能提供使用此MVC以及MVC和N层模型之间的区别的最佳实时示例?

Good Morning every one!Can any one give the best real time example where we use this MVC and the difference between MVC and N Tier Model?

推荐答案

vemuhemanthkumar写道:
vemuhemanthkumar wrote:

MVC与N层模型之间的差异

difference between MVC and N Tier Model



N层体系结构通常使每一层都被网络分隔开.即表示层位于某些Web服务器上,然后通过网络与后端应用程序服务器进行业务逻辑对话,然后又通过网络与数据库服务器进行对话,也许该应用程序服务器还呼出了一些远程服务器服务(例如Authorize.net进行付款处理).

MVC是一种编程设计模式,其中代码的不同部分负责表示某些应用程序中的模型,视图和控制器.这两件事是相关的,因为例如模型层可能具有内部实现,该实现调用数据库以存储和检索数据.控制器可以驻留在Web服务器上,并远程调用应用服务器以检索数据. MVC提取了如何实现应用程序体系结构的详细信息.



N-tier architecture usually has each layer separated by the network. i.e. the presentation layer is on some web servers, then that talks to back-end app servers over the network for business logic, then that talks to a database server, again over the network, and maybe the app server also calls out to some remote services (say Authorize.net for payment processing).

MVC is a programming design pattern where different portions of code are responsible for representing the Model, View, and controller in some application. These two things are related because, for instance the Model layer may have an internal implementation that calls a database for storing and retrieving data. The controller may reside on the webserver, and remotely call appservers to retrieve data. MVC abstracts away the details of how the architecture of an app is implemented.

vemuhemanthkumar写道:
vemuhemanthkumar wrote:

使用此MVC的最佳实时示例

best real time example where we use this MVC



这完全取决于您的项目行为必须如何!基于我上面指出的差异(当然还有更多!),您需要确定项目中需要遵循的体系结构.



This totally depends on how your project behaviour has to be! Based on the differences i pointed above (any many more ofcourse!), you need to decide on which architecture you need to follow in your project.


这篇关于ASP.NET MVC和N层模型之间的基本区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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