NancyFx – Part 1 – Getting ready to use it

I have been aiming at trying out a micro web framework for a while and have been choosing between: JessicaFx and NancyFx; but I’ve never gotten the time, until now. My choice fell on Nancy, despite Tom Bell’s (creator of JessicaFx) article, in which he thinks that Nancy has taken steps away from being a micro web framework by not just extending the Asp.Net stack. I kind of like that Nancy offers other hosting capabilities and that they strive to not being dependent on the Asp.Net web stack, but who knows, in the end I might use JessicaFX instead. Don’t you just love OSS? Instead of a complex solution from Microsoft, targeting a multitude of scenarios, you get multitude of OSS projects solving a smaller problem domain for one of these scenarios.

This is not an ending story

This is part 1 of me exploring Nancy, and in this part I will only describe my way of getting good to go, to start working with Nancy.

Not a Ruby guy….yet

I also never have gotten the time to look at Ruby. And not being a Ruby guy at all, I thought “Hey, why not use Rake to build Nancy and that way start to get a little bit closer to Ruby by at least installing it and installing some gems.” I know that I could have settled with downloading the binaries or even simpler using NuGet but as I’m looking at using Rake myself, why not download the source of NancyFx and use Rake and Albacore to build it.

Get your hands on Ruby

Google it and you’ll find: http://www.ruby-lang.org/en/downloads/. Well there, and since I’m a Windows guy, I used the recommended way of heading over to: http://rubyinstaller.org/downloads/ and at the time of this writing the latest version was: Ruby 1.9.2-p180.

IronRuby

Nice to know for .Net people needing to extend their every day static language writing with some dynamic Ruby: http://www.ironruby.net/.

Disclaimer

Just so that you know. I haven’t investigated any best practices whatsoever in the context of installing Ruby and Gems.

Install…

During the installation I explicitly selected the two checkboxes to add it to the Path environment variable and to associate it with Ruby files.

After the installation was finnished I just fired up the command prompt and typed:

gem install rake
gem install albacore

Now I see where NuGet has been ripped from has gotten the inspiration from.

Get your hands on Nancy

Just head over to their GitHub page via http://nancyfx.org. Download the source and unzip it locally. After that just fire up the command window and navigate to the path where the “rakefile.rb” is located and type:

rake

That’s it. You now have yourself a set of compiled assemblies located under build\binaries, all tested and compiled on your machine. That’s it for this part. Next time, will actually open up our favourite choice of IDE, Visual Studio 2010???

//Daniel

2 thoughts on “NancyFx – Part 1 – Getting ready to use it

    • Yeah but that would not be as much fun ;-) As I said. Should have been “Part 0″ ;-)

      There’s actually a link to the NuGet site for Nancy in the post.

      //Daniel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s