ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - 哪个是最

ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - which is the most lightweight?(ASP.NET MVC vs. Webforms vs. HTTP Handlers (.ashx) - 哪个是最轻量级的?)
本文介绍了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

  1. 在 ASP.NET MVC 中构建

  1. 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) - 哪个是最轻量级的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)