asp.net mvc和web表单之间有性能差异吗?(复制)

时间:2023-01-26 03:26:38

Possible Duplicate:
ASP.NET MVC Performance

可能的重复:ASP。净MVC性能

I know there is a learning curve, but what about performance? It seems to me that web forms would be less performant, but I havent tried MVC yet to know for sure. What is everyone else experiencing?

我知道有一个学习曲线,但是性能呢?在我看来,web表单的性能可能会降低,但我还没有尝试过MVC来确定。其他人都在经历什么?

3 个解决方案

#1


7  

This is almost a duplicate question. Here are some similar discussions:

这几乎是一个重复的问题。以下是一些类似的讨论:

ASP.NET MVC Performance

ASP。净MVC性能

What are the key differences between ASP.NET webforms and MVC

ASP之间的主要区别是什么?净webforms和MVC

Biggest advantage to using ASP.Net MVC vs web forms

使用ASP的最大优势。Net MVC vs web forms

#2


6  

The thing about WebForms is that it's very easy to make a page that performs really bad, because it encourages you to do a lot of simple updates server-side that really should be done client-side. If you're paying attention to your postbacks and ViewState then WebForms isn't so bad. Also, MVC has the potential for better performance because it takes fewer steps during a page load, but realizing that potential can require a lot of discipline by the programmer, just like web forms.

WebForms的特点是很容易创建一个性能很差的页面,因为它鼓励您做很多简单的服务器端更新,这些都应该在客户端完成。如果您正在关注您的回发和ViewState,那么WebForms并不是那么糟糕。此外,MVC具有更好性能的潜力,因为它在页面加载过程中只需要很少的步骤,但是要认识到这种潜力需要程序员进行大量的训练,就像web表单一样。

#3


1  

This is debatable because both of them have different performance pros and cons, for example ASP.net MVC gives you control over the HTML/JS that gets to the browser, so you can minimize the amount of data on wire to make the whole application weight less, however ASP.net MVC routing have so much dependency on Reflection, which is relatively slower than fetching a file from the disk which Web Forms is doing.

这是有争议的,因为他们都有不同的性能优缺点,例如ASP.net MVC提供了控制向浏览器的HTML / javascript,所以你可以减少线使整个应用程序的数据量重量少了,然而ASP.net MVC路由有这么多依赖反射,这是相对低于抓取文件从磁盘的Web表单。

#1


7  

This is almost a duplicate question. Here are some similar discussions:

这几乎是一个重复的问题。以下是一些类似的讨论:

ASP.NET MVC Performance

ASP。净MVC性能

What are the key differences between ASP.NET webforms and MVC

ASP之间的主要区别是什么?净webforms和MVC

Biggest advantage to using ASP.Net MVC vs web forms

使用ASP的最大优势。Net MVC vs web forms

#2


6  

The thing about WebForms is that it's very easy to make a page that performs really bad, because it encourages you to do a lot of simple updates server-side that really should be done client-side. If you're paying attention to your postbacks and ViewState then WebForms isn't so bad. Also, MVC has the potential for better performance because it takes fewer steps during a page load, but realizing that potential can require a lot of discipline by the programmer, just like web forms.

WebForms的特点是很容易创建一个性能很差的页面,因为它鼓励您做很多简单的服务器端更新,这些都应该在客户端完成。如果您正在关注您的回发和ViewState,那么WebForms并不是那么糟糕。此外,MVC具有更好性能的潜力,因为它在页面加载过程中只需要很少的步骤,但是要认识到这种潜力需要程序员进行大量的训练,就像web表单一样。

#3


1  

This is debatable because both of them have different performance pros and cons, for example ASP.net MVC gives you control over the HTML/JS that gets to the browser, so you can minimize the amount of data on wire to make the whole application weight less, however ASP.net MVC routing have so much dependency on Reflection, which is relatively slower than fetching a file from the disk which Web Forms is doing.

这是有争议的,因为他们都有不同的性能优缺点,例如ASP.net MVC提供了控制向浏览器的HTML / javascript,所以你可以减少线使整个应用程序的数据量重量少了,然而ASP.net MVC路由有这么多依赖反射,这是相对低于抓取文件从磁盘的Web表单。