
Nancy – A lightweight web framework for .NET - hitr
http://nancyfx.org
======
jackmott
If you like this sort of thing, and enjoy or are curious about F-Sharp, give
Suave a look: [https://suave.io/](https://suave.io/)

There are two great tutorials for it:
[https://www.gitbook.com/book/theimowski/suave-music-
store/de...](https://www.gitbook.com/book/theimowski/suave-music-
store/details)

and

[http://products.tamizhvendan.in/fsharp-
applied/](http://products.tamizhvendan.in/fsharp-applied/)

which gets more into how suave actually works.

------
Moto7451
I do a good bit of .Net webservice work and Nancy is my go to solution for
throwing up an HTTP API. I've taken the same app from a Windows oriented
ASP.net hosted to a Linux/Mono hosted self hosted service with very few
changes to the code. Even in the new .Net Core/MVC6 world I think Nancy is a
good option to consider given all the middleware and plugins available on
NuGet.

------
jsingleton
Looks like the beta version of Nancy now supports .NET Core.

Last I heard was this: [http://thecodejunkie.com/2016/02/22/working-full-time-
on-get...](http://thecodejunkie.com/2016/02/22/working-full-time-on-getting-
nancy-running-on-coreclr)

Digging into the code, it looks like the work has been merged in. I haven't
seen an official announcement though.

I'll update [https://anclafs.com/#web](https://anclafs.com/#web) (edit: done)

~~~
philliphaydon
Npgsql supports .ner core, as does Marten

~~~
jsingleton
OK, I'll update Npgsql. Not sure what you mean by Marten.

~~~
manigandham
Marten is a .NET database client that uses PostgreSQL as a document-database:

[http://jasperfx.github.io/marten/documentation/documents/](http://jasperfx.github.io/marten/documentation/documents/)

~~~
jsingleton
Cool, Raven was a pain last time I used it. I'll try this next time I need
something like that.

FYI this is now in [https://anclafs.com/#orms--dbs](https://anclafs.com/#orms
--dbs) thanks to [https://github.com/phillip-
haydon](https://github.com/phillip-haydon).

------
spriggan3
Don'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're
app can basically be a single class in your project.

~~~
jsingleton
The new MVC (or just Core now) is great, and much lighter / higher
performance. However, it's still more like Rails than Sinatra (to use a Ruby
analogy), which I guess is the niche Nancy is trying to fill.

~~~
coredog64
Nancy Sinatra is the daughter of Frank Sinatra, hence "Nancy".

------
teh_klev
There's a couple of podcasts from a while back where the HerdingCode [0]
podcast folks interview the creators of Nancy:

[http://herdingcode.com/herding-code-123-andreas-hakansson-
an...](http://herdingcode.com/herding-code-123-andreas-hakansson-and-steven-
robbins-on-nancyfx/)

[http://herdingcode.com/herding-code-156-catching-up-with-
and...](http://herdingcode.com/herding-code-156-catching-up-with-andreas-
hakansson-and-steven-robbins-on-nancyfx/)

Also vaguely related their podcast about OWIN and Katana which Nancy can run
on top of:

[http://herdingcode.com/herding-code-164-owin-and-katana-
with...](http://herdingcode.com/herding-code-164-owin-and-katana-with-louis-
dejardin/)

[0]: [http://herdingcode.com/archives/](http://herdingcode.com/archives/)

~~~
brudgers
[2011] Hanselminutes Podcast 270 - Nancy, Sinatra and the Explosion of .NET
Micro Web Frameworks with Andreas Håkansson:

[http://www.hanselman.com/blog/HanselminutesPodcast270NancySi...](http://www.hanselman.com/blog/HanselminutesPodcast270NancySinatraAndTheExplosionOfNETMicroWebFrameworksWithAndreasH%C3%A5kansson.aspx)

------
douche
I really like Nancy - we've been using it for a couple years now, since MVC
didn't really work with the OWIN/Katana self-hosted web-server components. I
like it's style of explicitly defining your HTTP routes and handlers, versus
the more implicit MVC style.

------
ComputerGuru
The neat thing about this is that it breaks away from the tightly-integrated
IIS/ASP.NET model (which, while normally a great thing for performance
reasons, can be unwanted or overkill).

~~~
tracker1
IIRC, ASP.Net <strike>5</strike> Core allows for stand-alone deployments, and
uses the same libuv under the covers than Node does. The development on the
open Core version of the .Net platform has been interesting to watch, and has
me actually interested in looking into it again.

------
daxfohl
Best lightweight option out there for C#, but could be better.

I wish it used composition rather than overriding everywhere, to give you more
flexibility in instantiating things dynamically.

I also didn'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.

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.

~~~
gagege
Yes, the web server should be just another interface that the domain uses to
communicate.

------
easuter
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
For those who already have an OpenAPI/Swagger spec, you can generate NancyFx
server stub using Swagger Codegen. Please refer to
[https://github.com/swagger-api/swagger-
codegen/wiki/Server-s...](https://github.com/swagger-api/swagger-
codegen/wiki/Server-stub-generator-HOWTO#nancyfx-module) for more information.

