ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - which is the most lightweight?(ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - 哪个是最轻量级的?)
问题描述
我计划构建一个简单但使用率很高的网络应用程序,并且需要确定一个架构.
I plan on building a simple, yet high usage webapp and need to settle on an architecture.
- 基本的服务器端逻辑/动态数据库驱动内容大约六到十几页的服务都说内容
- 无需重写 URL,
- 非常简单的页面流程/路由
我们的目标是发布此应用以使用尽可能少的带宽、内存和 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
在 ASP.NET MVC 中构建
build in ASP.NET MVC
使用视图状态构建网络表单禁用
build in webforms with viewstate disabled
使用 .ashx 处理程序和代码构建连接所有 HTML 输出变成它吐出的字符串
build using .ashx handlers with code that concatenates all HTML output into strings that it spits out
哪个是最轻量级的解决方案?
我很感激到目前为止的回复,但我不要求最好的解决方案.这是一个简单的应用程序,我想要一个使用最少机器/网络资源的解决方案.
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 vs. Webforms vs. HTTP Handlers (.ashx) - 哪个是最轻量级的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - 哪个是最
基础教程推荐
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- WPF 模态进度窗口 2022-01-01
