使用MVC和ASP.NET 3.5有什么好处 [英] What is advantages of using MVC alongwith ASP.NET 3.5

查看:129
本文介绍了使用MVC和ASP.NET 3.5有什么好处的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请为我提供此主题的解决方案

Please provide me solution for this topic

推荐答案

1.支持ViewState - 您可能已经听过几次HTTP是无状态协议。通常,控件不会在请求之间保留其值。但是在Web Forms中,通过以隐藏字段ViewState的形式存储客户端页面本身中每个控件的最后已知状态来实现状态。

2.事件驱动编程 - 借助◦代码后面

3.自我回发机制(将表格发回到同一页面)

4.ViewState -

微软在互联网世界中引入了事件驱动编程。

开发人员将不再依赖POST,GET方法来处理用户与服务器的交互。例如,她/他将控制(比如按钮)拖到页面,只需双击它就可以生成用于处理用户点击服务器的代码块,记下其中的逻辑。而已。她/他并不关心里面发生的事情。



5.快速应用程序开发 - 我认为不需要任何解释。丰富的服务器控件,事件驱动模型和ViewState在很大程度上提高了开发速度,开发人员将从许多背景复杂性中抽象出来。

6.学习努力。 - 使用强大的服务器控件和ViewState开发人员可以用最少的HTML和JavaScript技能开发真实世界的应用程序。



查看此链接了解更多信息
1.Support for ViewState - You might have heard couple of times "HTTP is a stateless protocol". Normally controls will not retain their values between requests. But in Web Forms statefulness is achieved by storing last known state of every control within the client page itself in the form of hidden field called ViewState.
2.Event driven programming - With the help of ◦Code behind
3.Self postback mechanism (posting back form to the same page)
4.ViewState -
Microsoft introduced event driven programming in internet world.
Developer will no more rely on POST, GET methods for handling user interactions with server. For example she/he will drag control (say button) to page, just double click it to generate the code block for handling user’s click on server, write down the logic inside it. That’s it. She/he is not concerned with what happens inside.

5.Rapid application development - I don’t think any explanation is required for this. Rich server controls, Event driven model and ViewState increases the development speed by great extent, Developer will be abstracted from lots of the background complexities.
6.Less learning effort. - Using strong server controls and ViewState developer can develop real world applications with minimal HTML and JavaScript skills.

See this link For more information


除上述解决方案外,请参阅下面MSDN上给出的示例

在ASP.NET中实现模型 - 视图 - 控制器 [ ^ ]



基于MVC的Web应用程序的优点



通过将应用程序划分为模型,视图和控制器,可以更轻松地管理复杂性。



它不使用视图状态或基于服务器的表单。这使得MVC框架非常适合希望完全控制应用程序行为的开发人员。



它使用前端控制器模式,通过单个控制器处理Web应用程序请求。这使您能够设计支持丰富路由基础结构的应用程序。



适用于需要大型开发人员和Web设计人员的大型团队支持的Web应用程序。对应用程序行为的高度控制。





基于Web窗体的Web应用程序的优点



它支持通过HTTP保留状态的事件模型,这有利于业务线Web应用程序开发。基于Web窗体的应用程序提供了数百个服务器控件支持的许多事件。



它使用页面控制器模式为各个页面添加功能。 />


它使用视图状态或基于服务器的表单,这可以使管理状态信息更容易。



它的工作原理适用于希望利用大量可用于快速应用程序开发的组件的Web开发人员和设计人员团队。



一般情况下,它不太复杂应用程序开发,因为组件(Page类,控件等)紧密集成,通常需要的代码少于MVC模型。



来自此处 [ ^ ]



-KR
In addition to the above solution, see the example given below on MSDN
Implementing Model-View-Controller in ASP.NET[^]

Advantages of an MVC-Based Web Application

It makes it easier to manage complexity by dividing an application into the model, the view, and the controller.

It does not use view state or server-based forms. This makes the MVC framework ideal for developers who want full control over the behavior of an application.

It uses a Front Controller pattern that processes Web application requests through a single controller. This enables you to design an application that supports a rich routing infrastructure.

It works well for Web applications that are supported by large teams of developers and Web designers who need a high degree of control over the application behavior.


Advantages of a Web Forms-Based Web Application

It supports an event model that preserves state over HTTP, which benefits line-of-business Web application development. The Web Forms-based application provides dozens of events that are supported in hundreds of server controls.

It uses a Page Controller pattern that adds functionality to individual pages.

It uses view state or server-based forms, which can make managing state information easier.

It works well for small teams of Web developers and designers who want to take advantage of the large number of components available for rapid application development.

In general, it is less complex for application development, because the components (the Page class, controls, and so on) are tightly integrated and usually require less code than the MVC model.

From here[^]

-KR


这篇关于使用MVC和ASP.NET 3.5有什么好处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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