NancyFX, it’s awesome!

I don’t know about you, but I’m tired of all heavy, dirty and messy frameworks, etc like ASP.NET WebForms (ugh), MVC, and so on. It’s not practical, it’s not simple, there’s no fun on working with it. I don’t know if you ever seen Sinatra. To get an example of how simple and beautiful it is, just take a look at the quick example on it’s homepage:

require 'sinatra'

get '/hi' do
  "Hello World!"

It’s clean, as soon as you put your eyes on it, you know what’s going on, right? Now, if you are a .Net programmer and you’ve never seen light frameworks such as Nancy, you are thinking right now: “it’s impossible to do something like this on the heavy n’ old”.
and if I say that it is possible? Not as simple as that 4 lines of code, but almost there! Take a look at the code below:

using Nancy;

namespace me.Modules
    public class HomeModule : NancyModule
        public HomeModule()
            Get["/"] = _ => "Hello World!";

That’s how you do the sinatra way on .net! It’s simple, quick, light, beautiful, and still .net, still c#. We’re almost there ruby developers =D. If we could get rid of those ugly brackets…
But you know how we can do that? I’m not going to show you more code, I’m not going to give you a ~cake recipe~, like i did before with nhibernate, mvc and so on… and it’s not beacause I’m lazy right now, but it’s because you don’t need!
Open you Visual Studio, create an empty project. Now that you have an empty project, type: Install-Package Nancy.Hosting.Aspnet.
Now go on, create a class called HomeModule and copy n’ paste the code above and thats it! If you like, just go to my github and see by yourself the project 😉

See yah! 😉