Hacker News new | past | comments | ask | show | jobs | submit login

I had the same problem. I googled "Mono Nancy" and eventually found this:

https://github.com/NancyFx/Nancy

EDIT: It seems to be a .NET clone of node.js




No, it's a Sinatra-inspired framework for .NET ...and it's quite good!

(Thus the name. Frank Sinatra's daughter is named Nancy Sinatra)


no it's not. it's a .NET clone of sinatra. it's a web framework. it has little to nothing to do with node.js. although .net have pretty powerful multiprocessing and async routines, and can therefore be connected to node.js without too much effort.


If you don't mind me asking, I'm stuck trying to get the project templates to work with Monodevelop 4. I'm using this repository to run the latest Mono and Monodevelop on Fedora: http://download.opensuse.org/repositories/home:/tpokorra:/mo...

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?


monodevelop is not really supported. i would try compiling the latest mlnodevelop and see if there is a fork of the nancy templates.

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


SUCCESS! I followed these:

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.


How does it compare to Web API?


Nancy, like Sinatra, is a general-purpose web framework. You could implement an API in it, or you could implement a user-facing website.

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.


ServiceStack [1] is a closer comparison to Web API. A lot easier to set up and runs in Mono, but not free (although it is open source [2]).

[1] - http://servicestack.net [2] - https://github.com/ServiceStack/ServiceStack


.NET clone of node.js would be nice, because I like the idea of node.js but not enough to ditch all my .NET stuff (especially entity framework).


There's nothing in node.js that you can't get with .NET/Mono except for JavaScript, and even if you must run JS for some reason there are some solutions (like IronJS).


Edge.js might interest you. It's an interop library for .Net and node.js: http://tjanczuk.github.io/edge/#/


Entity Framework is really not a good excuse. .NET has lots of great things going for it. Entity Framework is firmly on the "enterprise .NET" list of such items though.

.NET has always been able to do what Node does anyway. It has had HttpListener since v1.0...


Think you'll be getting a shock in a couple of years if you think the EF is enterprise. It's changed massively and coding without it is becoming a little like coding javqscript without jQuery.

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.


I think that the LINQ integration with EF is nice.. but EF in and of itself isn't all that great imho... Most of what it does is generate types to correspond to your database tables.

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.

[1] https://www.npmjs.org/package/hyena


C# (.NET4+) has real variable types, and a library to use them for database access.

Using Type dynamic - http://msdn.microsoft.com/en-us/library/dd264736.aspx

https://github.com/robconery/massive


When you use dynamic, you lose the biggest advantage of C# in general, intellisense in VS. Don't get me wrong, it can be great to use dynamic at times... I just feel you're losing the advantage that VS/C# give you when you do, so you may as well be using something else. (I like node.js)


I started something along these lines a while ago. Haven't touched in quite some time though.

https://github.com/martydill/node.fs


OWIN will give some of what you are looking for.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: