是什么asp.net MVC应用程序和asp.net web应用程序之间的差异 [英] what is the difference between the asp.net mvc application and asp.net web application

查看:111
本文介绍了是什么asp.net MVC应用程序和asp.net web应用程序之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何一个可以解释的asp.net MVC和Web应用程序之间的区别。
在MVC中,我们可以找到控制器文件夹。我们不能能够找到控制器的文件夹中的Web应用程序..!请消失我的困惑。

can any one explain the difference between the mvc and web application in asp.net. in mvc we can find controllers folder. cant we able to find controllers folder in web application..! please vanish my confusion.

推荐答案

这是ASP.NET MVC应用程序是依赖于ASP.NET MVC框架的应用程序。 MVC表示模型视图控制器,它定义使用MVC模式创建的应用程序的三个组成部分。

An ASP.NET MVC application is an application which depends upon the ASP.NET MVC Framework. MVC stands for Model, View Controller, the three components which define an application created using the MVC pattern.

MVC模式的目的是单独的应用程序的逻辑,数据和presentation成不同的,有些独立的组件。

The MVC pattern aims to seperate an applications logic, data and presentation into distinct, somewhat independent components.

型号

模型是应用程序的数据进行重新presentation。例如,一个购物应用程序可能有车的模型重新present用户的购物车的状态。

Models are a representation of an application's data. For example a shopping application might have a Cart model to represent the state of a user's shopping cart.

查看

一个观点是包含在模型中的数据的可视化再presentation。视图类应该如何knoow模式(S)的细节,它使用应该是presented。

A view is a visual representation of the data contained in the model. A view class should knoow the specifics of how the model(s) it uses should be presented.

控制器

该控制器的工作是处理用户输入和更新模型的状态,以反映所做作为用户操作的结果的变化。例如想象用户正在浏览一个联系我们页面并点击提交按钮。该控制器会通过从表单字段更新与值模型按钮点击响应,然后保存模型,使其进行验证,然后写入数据库。

The Controller's job is to handle user input and update the state of the Model to reflect the changes that were made as a result of user action. For example imagine the user is viewing a Contact Us page and clicks the Submit button. The controller would respond to the button click by updating the model with values from the form fields and then save the model, causing it to be validated and then written to the database.

这是MVC模式的一个很浅的,不完整的解释,你应该头部到 ASP.NET MVC首页获得MVC模式与ASP.NET MVC框架的一个更全面的了解。

This is a very shallow and incomplete explaination of the MVC pattern you should head over to the ASP.NET MVC homepage to get a more complete view of the MVC pattern and the ASP.NET MVC framework.

这是ASP.NET Web应用程序使用一种称为Web窗体独立的框架。因为Web窗体中不使用MVC模式定义的惯例,Web应用程序模板不创建一个类似的文件夹结构。

An ASP.NET Web Application uses a separate framework known as Web Forms. Because Web Forms does not use the conventions defined in the MVC pattern, the Web Application template does not create a similar folder structure .

使用哪种框架是不是相互排斥的,二重present不同的方法解决同一问题。对于这是最高效的数据访问我会参考,你迈克尔Shimmins优秀评论

The use of either framework is not mutually exclusive, the two represent differing approaches to the same problem. With respect to which is most efficient for data access I would refere you to Michael Shimmins' excellent comment

这篇关于是什么asp.net MVC应用程序和asp.net web应用程序之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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