本文介绍了web表单VS asp.net mvc的单页面应用程序 - 选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建一个单一的网页应用程序(例如如Gmail),我想知道这asp.net框架会比较好?

I'm building a single page application (e.g. like gmail) and I was wondering which asp.net framework would be better?

asp.net mvc的可以让你完全控制,并与沉重的AJAX网站更容易,但它不是很好,当涉及到的部分意见(或用户控件的web表单)。我的页面分为不同的地区,它们的行为很对自己,所以能够将它们分开是非常多的问题。

asp.net mvc allows you full control and is easier with heavy ajax sites, but it isn't very good when it comes to partial views (or userControls in webforms). My page is divided into different "regions" which behave very much on their own, so being able to separate them is very much an issue.

我知道我可以使用PartialViews,但我不知道MVC是有利于他们。

I know i can use PartialViews, but i'm not sure that MVC is in favor of them.

在另一方面有asp.net web表单它适合于用户控件容易得多,但也没有那么好当谈到AJAX和沉重的JavaScript作为多MVC是。我还看到有人在MVP种编程的使用web表单这里的一切工作是在pageLoad的,并为此有很多MVC的好处。

on the other hand there's asp.net webforms which lends itself to userControls much easier, but is not as good when it comes to AJAX and heavy javaScript as much as MVC is. I've also seen people use webforms in an MVP kind of programming where everything is done in PageLoad and therefor has a lot of MVC's benefits.

对于单页应用程序,这是更方便?

for a Single Page Application, which is more convenient?

推荐答案

有关丰富的单一形式的应用我将与ASP.NET MVC开始,因为有更少的平台约束的方式获得,并呈现HTML更趋于轻巧比传统ASP.NET。

For rich single form applications I would start with ASP.NET MVC as there are fewer platform constraints to get in the way, and rendered HTML tends to be more lightweight than classic ASP.NET.

您可以设计ASP.NET MVC应用程序在一个高度模块化的方式,这表现在几个MVC CMS,如乌节路, HTTP: //orchardpro​​ject.net/ 。这些高度模块化的框架是在ASP.NET MVC完全基于。 ASP.NET MVC 3使得整个过程非常简单。

You can design ASP.NET MVC applications in a highly modular fashion, as demonstrated by several MVC CMS' such as Orchard, http://orchardproject.net/. These highly modular frameworks are based entirely on ASP.NET MVC. ASP.NET MVC 3 makes the whole process quite easy.

便利性可能意味着很多东西。从你的开发商方便的角度(假设你是唯一一个开发应用程序,并假设只有你需要的模块插入自己的区域并入您的应用程序),它会更加方便您开发与任何框架,你更精通。

Convenience can mean many things. From a "you the developer" convenience perspective (assuming that you will be the only one developing the application, and assuming that only you will require the modularity to plug your own regions into your application), it will be more convenient for you to develop with whatever framework you are more proficient with.

这篇关于web表单VS asp.net mvc的单页面应用程序 - 选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 07:10