TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Nancy – A lightweight web framework for .NET

76 点作者 hitr将近 9 年前

10 条评论

jackmott将近 9 年前
If you like this sort of thing, and enjoy or are curious about F-Sharp, give Suave a look: <a href="https:&#x2F;&#x2F;suave.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;suave.io&#x2F;</a><p>There are two great tutorials for it: <a href="https:&#x2F;&#x2F;www.gitbook.com&#x2F;book&#x2F;theimowski&#x2F;suave-music-store&#x2F;details" rel="nofollow">https:&#x2F;&#x2F;www.gitbook.com&#x2F;book&#x2F;theimowski&#x2F;suave-music-store&#x2F;de...</a><p>and<p><a href="http:&#x2F;&#x2F;products.tamizhvendan.in&#x2F;fsharp-applied&#x2F;" rel="nofollow">http:&#x2F;&#x2F;products.tamizhvendan.in&#x2F;fsharp-applied&#x2F;</a><p>which gets more into how suave actually works.
Moto7451将近 9 年前
I do a good bit of .Net webservice work and Nancy is my go to solution for throwing up an HTTP API. I&#x27;ve taken the same app from a Windows oriented ASP.net hosted to a Linux&#x2F;Mono hosted self hosted service with very few changes to the code. Even in the new .Net Core&#x2F;MVC6 world I think Nancy is a good option to consider given all the middleware and plugins available on NuGet.
jsingleton将近 9 年前
Looks like the beta version of Nancy now supports .NET Core.<p>Last I heard was this: <a href="http:&#x2F;&#x2F;thecodejunkie.com&#x2F;2016&#x2F;02&#x2F;22&#x2F;working-full-time-on-getting-nancy-running-on-coreclr" rel="nofollow">http:&#x2F;&#x2F;thecodejunkie.com&#x2F;2016&#x2F;02&#x2F;22&#x2F;working-full-time-on-get...</a><p>Digging into the code, it looks like the work has been merged in. I haven&#x27;t seen an official announcement though.<p>I&#x27;ll update <a href="https:&#x2F;&#x2F;anclafs.com&#x2F;#web" rel="nofollow">https:&#x2F;&#x2F;anclafs.com&#x2F;#web</a> (edit: done)
评论 #12107021 未加载
spriggan3将近 9 年前
Don&#x27;t see the point of Nancy today with the latest MVC6 that can be made really light weight when one needs just a few end points without bloat. You&#x27;re app can basically be a single class in your project.
评论 #12106477 未加载
teh_klev将近 9 年前
There&#x27;s a couple of podcasts from a while back where the HerdingCode [0] podcast folks interview the creators of Nancy:<p><a href="http:&#x2F;&#x2F;herdingcode.com&#x2F;herding-code-123-andreas-hakansson-and-steven-robbins-on-nancyfx&#x2F;" rel="nofollow">http:&#x2F;&#x2F;herdingcode.com&#x2F;herding-code-123-andreas-hakansson-an...</a><p><a href="http:&#x2F;&#x2F;herdingcode.com&#x2F;herding-code-156-catching-up-with-andreas-hakansson-and-steven-robbins-on-nancyfx&#x2F;" rel="nofollow">http:&#x2F;&#x2F;herdingcode.com&#x2F;herding-code-156-catching-up-with-and...</a><p>Also vaguely related their podcast about OWIN and Katana which Nancy can run on top of:<p><a href="http:&#x2F;&#x2F;herdingcode.com&#x2F;herding-code-164-owin-and-katana-with-louis-dejardin&#x2F;" rel="nofollow">http:&#x2F;&#x2F;herdingcode.com&#x2F;herding-code-164-owin-and-katana-with...</a><p>[0]: <a href="http:&#x2F;&#x2F;herdingcode.com&#x2F;archives&#x2F;" rel="nofollow">http:&#x2F;&#x2F;herdingcode.com&#x2F;archives&#x2F;</a>
评论 #12107352 未加载
douche将近 9 年前
I really like Nancy - we&#x27;ve been using it for a couple years now, since MVC didn&#x27;t really work with the OWIN&#x2F;Katana self-hosted web-server components. I like it&#x27;s style of explicitly defining your HTTP routes and handlers, versus the more implicit MVC style.
ComputerGuru将近 9 年前
The neat thing about this is that it breaks away from the tightly-integrated IIS&#x2F;ASP.NET model (which, while normally a great thing for performance reasons, can be unwanted or overkill).
评论 #12107552 未加载
daxfohl将近 9 年前
Best lightweight option out there for C#, but could be better.<p>I wish it used composition rather than overriding everywhere, to give you more flexibility in instantiating things dynamically.<p>I also didn&#x27;t like how it tries to encapsulate the ioc controller. Makes it difficult when you want Nancy itself to be a dependency, or to run in a repl.<p>I would rather allow the ioc controller to manage the web server, like Jetty does it in the Java world. Not sure anything like this exists in C# land though.
评论 #12106668 未加载
easuter将近 9 年前
Love this framework, it has been a lifesaver when I need to implement an HTTP API in an existing Windows service, with no need to rely on IIS.
wing328hk将近 9 年前
For those who already have an OpenAPI&#x2F;Swagger spec, you can generate NancyFx server stub using Swagger Codegen. Please refer to <a href="https:&#x2F;&#x2F;github.com&#x2F;swagger-api&#x2F;swagger-codegen&#x2F;wiki&#x2F;Server-stub-generator-HOWTO#nancyfx-module" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;swagger-api&#x2F;swagger-codegen&#x2F;wiki&#x2F;Server-s...</a> for more information.