Compare efficiency between WebForms and MVC? Ideas..

  • Thread starter Thread starter szwejk
  • Start date Start date
S

szwejk

Hi!

I want to show the difference between efficiency of ASP.NET WebForms
and ASP.NET MVC. I am interested in the amount of data transferred
from and to a client as well as the time needed to process a request.

Are there any tools or methods to do that? Do you have any idea?
 
szwejk said:
I want to show the difference between efficiency of ASP.NET WebForms
and ASP.NET MVC. I am interested in the amount of data transferred
from and to a client as well as the time needed to process a request.

Are there any tools or methods to do that? Do you have any idea?

You could enable tracing in your web.config by setting <trace
enabled="true" pageOutput="false" />. This will capture, among other things
the amount of data transferred and the time elapsed. At least, it will work
for WebForms; I am not sure about wether the Trace works with MVC, but at
least it will solve half of your problem.
 
Hi!

I want to show the difference between efficiency of ASP.NET WebForms
and ASP.NET MVC. I am interested in the amount of data transferred
from and to a client as well as the time needed to process a request.

Are there any tools or methods to do that? Do you have any idea?

Applications are logic, not UI. While MVC might make you a better coder
(then again, you might develop new bad habits >;->), the amount of data
is going to be pretty much the same. The main reason MVC might beat out
a web form is you have more efficiently coded the HTML sent to the user
than the controls you slapped on a page. And there are ways to lighten
the code in an ASP.NET webform.

The processing of a request, if you have the logic sitting in a library
rather than your UI, is going to be pretty much the same. Okay, I take
that back. MVC will win, as the "event model" is thinner, but i doubt it
will be enough to be worth choosing MVC for this reason. Wait, you don't
work for Google, right? ;-)

The better question to ask is which project type will help you build
loosely coupled applications easier, as loosely coupled apps are easier
to maintain in the long run. I would say both, but most would argue MVC,
as it forces some separation by the nature of the pattern. In addition,
there are more examples of tiered development in MVC than in standard
ASP.NET. There are also examples with controllers full of all of the
bussiness logic, so it is not a firm rule.

As for your question, you can trace two versions of the same application
and set up a network monitor to watch the number of bytes downloaded to
the client. There are tools to accomplish both of these tasks, with the
tracing thing existing in .NET, if you don't want a third party
application. In fact, you could code a "trace listener" that can be
added to both types of apps and kill both with one stone.

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
You could enable tracing in your web.config by setting <trace
enabled="true" pageOutput="false" />. This will capture, among other
things the amount of data transferred and the time elapsed. At least,
it will work for WebForms; I am not sure about wether the Trace works
with MVC, but at least it will solve half of your problem.

It can be traced, although most are finding the standard way of tracing
bombs out. There are also third party tools, like dynaTrace that will
instrument both types of applications.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top