ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - which is the most lightweight?

NoCarrier picture NoCarrier · May 13, 2009 · Viewed 10.5k times · Source

I plan on building a simple, yet high usage webapp and need to settle on an architecture.

  • basic server side logic / dynamic db driven content about half a dozen to a dozen pages serving up all said content
  • no need for URL rewriting,
  • pretty simple page flow/routing

The objective is to publish this app to use the least amount of bandwidth, memory, and CPU as possible. That said, my options are to

  1. build in ASP.NET MVC

  2. build in webforms with viewstate disabled

  3. build using .ashx handlers with code that concatenates all HTML output into strings that it spits out

Which is the most lightweight solution?

I appreciate the responses so far, but i'm not asking for the best solution. This is a simple app, and i want the solution that will use the fewest machine/network resources.

Answer

Pure.Krome picture Pure.Krome · May 13, 2009

HttpHandlers are the most lightweight from your list of 3 options.

Personally, I would use ASP.NET MVC because it gives you a richer development environment with very little extra server overhead, especially if u turn most things off ..

eg. roles, etc.

Also use IIS7 intergrated mode and turn as much IIS7 settings off etc.