ASP.NET MVC与Web表单与HTTP处理程序(ashx的) - 这是最轻量级的? [英] ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - which is the most lightweight?

查看:231
本文介绍了ASP.NET MVC与Web表单与HTTP处理程序(ashx的) - 这是最轻量级的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划建立一个简单,但高使用率的web应用,需要解决的一个架构。

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


  • 基本服务器端逻辑/动态数据库
    大约半打来驱动的内容
    服务了十几页都表示
    内容

  • 不再需要URL重写,

  • pretty简单的页面流/路由

我们的目标是发布这个应用程序使用的带宽,内存的最小量,CPU越好。这就是说,我的选择是,以

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. 在构建ASP.NET MVC

  1. build in ASP.NET MVC

建立与视图状态的WebForms
禁用

build in webforms with viewstate disabled

建立使用ashx的处理程序与code
该串联所有HTML输出
到它吐出串

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

这是最轻量级的解决方案?

我AP preciate的响应,到目前为止,但我的不是要求的最佳解决方案。这是一个简单的应用程序,并且我想将使用最少的整机/网络资源的解决方案。

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.

推荐答案

HttpHandlers的是重量最轻的,因为ASHX文件背后的接口是的IHttpHandler这是既用于Web Forms和MVC Page对象的基础

HttpHandlers are the most light weight, because the interface behind the ASHX file is IHttpHandler which is the basis of the Page object that is used both for Web Forms and MVC.

这篇关于ASP.NET MVC与Web表单与HTTP处理程序(ashx的) - 这是最轻量级的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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