[英]Are there alternatives to ASP.NET for C# web development?
Lately, I've been thinking that I'd like to try some new ideas and a new approach to web application design. 最近,我一直在想,我想尝试一些新的想法和一种新的Web应用程序设计方法。 I'm mostly used to using ASP.NET (.NET 2.0) but I've toyed with the ASP.NET MVC library a little bit as well.
我大多习惯使用ASP.NET(.NET 2.0),但我也玩过一些ASP.NET MVC库。 While both are powerful and interesting, I'd really like something more... basic.
虽然两者都很强大而且很有趣,但我真的更喜欢更基本的东西。
Is there anything like that out there? 那里有类似的东西吗? I'd like a framework that's more transparent really: I want to be able to see the request, pass it where I want, render HTML the way I want, and post requests how I want.
我想要一个更透明的框架:我希望能够看到请求,将其传递到我想要的地方,以我想要的方式呈现HTML,并发布请求我想要的方式。 I can get all that in ASP.NET, but I have to dig pretty hard to get at all of it.
我可以在ASP.NET中获得所有这些,但我必须非常努力地去挖掘它。 I'd like something simpler to use as the basis for some new framework ideas.
我想用一些简单的东西作为一些新框架思想的基础。
So is there something like that out there? 那里有类似的东西吗? Or would I pretty much have to completely reinvent all the basic routing, request, and response code as well to get a platform to build up from?
或者我是否必须完全重新发明所有基本的路由,请求和响应代码以及从中获得一个平台?
我不确定它是否符合您的要求,但您绝对可以查看Manos
It's not answering the question but I really strongly think you're making a mistake here. 它没有回答这个问题,但我真的强烈认为你在这里犯了一个错误。
MVC lets you deal with rendering in the way you want (it's not like the bad old webforms), HttpHandlers let you deal with Requests and Responses as low down as makes reasonable sense (to me). MVC允许你以你想要的方式处理渲染(它不像糟糕的旧webforms), HttpHandlers让你处理请求和响应尽可能低(对我而言)。 99 times out of 100 you don't want to have to deal with the raw raw data coming from the web server (and what is raw anyway? "Request" is an abstraction itself...).
100个中有99个你不想处理来自Web服务器的原始原始数据(无论如何都是原始数据?“请求”本身就是一个抽象......)。
I think you have to look long and hard at your motivation and consider the practical costs if you could get there. 我认为你必须长时间坚持你的动力并考虑实际成本,如果你能到达那里。
你应该看看Fubu MVC然后是FubuMVC
I would go and implement an HTTP handler using ASHX files . 我会去使用ASHX文件实现一个HTTP处理程序 。 It gives all the power of ASP.NET object model but do not limit you on any special way of handling the request.
它提供了ASP.NET对象模型的所有功能,但不限制您处理请求的任何特殊方式。
If you are looking for alternate frameworks you might want to have a look at Nina 如果您正在寻找替代框架,您可能想看看Nina
https://github.com/jondot/nina https://github.com/jondot/nina
From the website: 来自网站:
Nina is a web microframework for the .Net platform, inspired by Sinatra. Nina是.Net平台的网络微框架,受Sinatra的启发。 It includes several aspects that go futher beyond Sinatra, such as an abstract, pluggable, and extensible infrastructure.
它包括几个超越Sinatra的方面,例如抽象,可插拔和可扩展的基础架构。
Although this is a relatively old question, I would like to add some other frameworks that are worth a look: 虽然这是一个相对古老的问题,但我想补充一些值得一看的其他框架:
There is the ASP.net Model View Presenter which may be something like what you are looking for. ASP.net模型视图演示器可能与您正在寻找的东西类似。
http://www.codeproject.com/KB/architecture/ModelViewPresenter.aspx http://www.codeproject.com/KB/architecture/ModelViewPresenter.aspx
It sounds to me like you're looking for a microframework like Sinatra , but in c# instead of Ruby. 听起来像你正在寻找像Sinatra这样的微框架 ,但在c#而不是Ruby中。 I am not aware of any such framework.
我不知道任何这样的框架。
I recommend you dive into Sinatra itself. 我建议你潜入Sinatra本身。 Learning Ruby will help expand you as a developer, you'll be closer to the HTTP metal (which sounds like what you want), and it'll be fun.
学习Ruby将有助于扩展您作为开发人员,您将更接近HTTP金属(这听起来像你想要的),它会很有趣。 The minimalism and simplicity that it sounds like you're looking for is much more popular in the Ruby community.
这听起来像你正在寻找的极简主义和简单性在Ruby社区中更受欢迎。
If you can use mono. 如果你可以使用单声道。 Then you can try Mongrel2 with dot net bindings.
然后你可以尝试使用点网绑定的Mongrel2。 It is very fast language agnostic web server.
它是非常快速的语言无关的Web服务器。 It works via zeroMQ.
它通过zeroMQ工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.