https://github.com/NancyFx/Nancy
EDIT: It seems to be a .NET clone of node.js
(Thus the name. Frank Sinatra's daughter is named Nancy Sinatra)
When I open the vsix file, all I get is a hexdump. I also tried installing it as an add-in, but it doesn't appear to accept vsix files.
The goal is to get past step one of these instructions: https://github.com/NancyFx/Nancy/wiki/Introduction
How to make this work, pretty please?
you can work around that issue if you make an empty asp.net project and then use nuget to install-package nancy.hosting.aspnet
at least i think so, i haven't been doing .net in a while
http://rubygems.org/gems/albacore/versions/1.0.0.rc.1 (for the command to install albacore), and
https://github.com/NancyFx/Nancy/wiki/Running-Nancy-on-your-...
This works on Fedora and probably other distributions as well, though this uses HTTP which might be less optimal than FastCGI with Fos. I got Fos to compile with Mono but it's not usable yet, it can't find IAppBuilder in my "console" application no matter what references or using directives I add. Nowin compiles cleanly but the example projects don't, so it'll take some effort to get it to work. Things are progressing, though. But I really can't recommend anyone use Mono for web development as it stands.
Nancy and Sinatra are typically used for smaller sites. They're based around routes, controllers, and views but they don't (for better or worse) lock you into an MVC project structure like ASP.Net MVC or Rails.
Web API, by comparison, is pretty much "just for implementing a web-based API" and not something you'd want to use for a user-facing web application that serves up HTML pages.
[1] - http://servicestack.net [2] - https://github.com/ServiceStack/ServiceStack
.NET has always been able to do what Node does anyway. It has had HttpListener since v1.0...
You can do it, but why bother writing all those crud operations yourself??
Even with complicated SQL you can hand roll it and then tell the EF which class you're.returning and it'll handle all the boring `rs.GetInt(rs.GetOrdinal("ID"))` crap.
When you use a language with real variable types, it's less of an issue... If you really want it, you could shoehorn generators and other db platforms into the hyena[1] package.
In general, I've found that using databases tend to be much more straight forward under node, and that using ORM tools are less necessary.
Using Type dynamic - http://msdn.microsoft.com/en-us/library/dd264736.aspx
http://curtis.schlak.com/2014/02/04/setup-asp-net-mvc-4-on-m...
NoWin, Nancy, SignalR & Lego on the raspberry pi:
I'd say there are plenty of alternatives to OWIN (and the .Net stack) for *nix. That's probably why there's not much interest around Mono, too.
SO close...
Edit: An open source program must never depend on binaries in the build process where those binaries can't themselves be rebuilt from source. Again, I'm not a zealot but as a developer I see dependencies on arbitrary binaries as damage and try to work around them.
(as nifty as mvc can possibly be anyway)
public SampleModule() { Get["/"] = _ => "Hello World!"; }
[0] https://github.com/NancyFx/Nancy/wiki/Taking-a-look-at-the-D...
To perhaps clarify a bit, here's what the Hello World example would look like if we added a second route that uses the lambda parameter, and a third route that does something else, and a fourth route that renders a view template.
public SampleModule() {
Get["/"] = _ => "Hello World!";
Get["/hello/{name}"] = p => ("Hello, " + p.name + "!");
Get["/something-complicated"] = _ => {
// complicated stuff happens here
return "OK... we're all done";
};
// A variety of template engines are supported
Get["/my-resume"] = _ => View["resume.cshtml"];
} Get["/"] = _ => "Hello World!";
is actually of the form a = b;Where "a", i.e. "Get["/"]" is an array-like property (http://msdn.microsoft.com/en-us/library/2549tw02.aspx ) and the "b" value assigned to it is an anonymous function with one parameter, i.e.
_ => "Hello World!"
In Nancy these handlers are of the type Func<dynamic, dynamic> ( http://msdn.microsoft.com/en-us/library/bb549151(v=vs.110).a... ) The parameter could be given any legal name, but an underscore is a convention meaning "I am not using this param". public SampleModule()
{
Get["/{id:int}"] = _ =>
{
int id = _.id;
return "Parameter ID is: " + id.ToString();
};
}
Edit: Seems like many do not know about Nancy, check it out, some even say it's better than MVC. The good side is that it's 100% compatible with Mono because they run tests against it too so you can host your C# websites on Linux.
Github: https://github.com/NancyFx/Nancy