Tutorial: Nancy + MongoDb + AppHarbor
Time for a quick tutorial on how to get a site up and running on AppHarbor using Nancy and MongoDb.
Time for a quick tutorial on how to get a site up and running on AppHarbor using Nancy and MongoDb.
Today my toolset of choice for a quick learning session is Nancy.
Reading straight from the box
Nancy is a lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono. The goal of the framework is to stay out of the way as much as possible and provide a super-duper-happy-path to all interactions.
Got that? Think of it as a replacement for WebForms or ASP.NET MVC.
First in my “Learn Something New” series is Knockout, a javascript MVVM framework.
Knockout is beautifully simplistic. You define a ViewModel, bind it to your UI, and away it goes keeping the two in sync. It really is beautiful stuff for a javascript heavy UI.
I answered a question on StackOverflow yesterday which I am pretty happy with, so I thought I would share the link on here.
The question asks for general advice on how to write and test an ASP.NET MVC 3 website that correctly uses Inversion-of-Control, Unit Testing and Mocking.
Today my post is to announce the release of a small plugin I have been working on over the last few days. It is a plugin for the Glimpse client side debug tool that integrates profiling information from RavenDb.
I have recently been using (and occasionally contributing to) RavenDB, a NoSQL (or Document) database for .NET written by Oren Eini, aka ayende.
My biggest contribution yet has been to help with the basic "glue" to drive the new UI for profiling RavenDB requests in an ASP.NET MVC web application.
Microsoft released the ASP.NET MVC Release Candidate yesterday (Link). One thing that pricked my ears in the release notes was a change to the ControllerContext
that would apparently make it easier to use a mocking tool to unit test actions that needed to interact with the standard HTTP objects.
I am slowly evolving my general layout for ASP.NET MVC applications as I come more and more to grips with the framework and they ways I am most comfortable using it.
This post is going to be a bit of an overview of how I am laying out my project at the moment in case it is of use to anyone.
One thing I have always needed to do in my web sites is break sections of pages out into a re-usable component. If you look at http://www.ht.com.au the "Featured Product Of The Month" panel displays three product "patches". This exact same patch is used on the Cart page and the Hub pages. It is a nice little class/template that you pass a product number to and it spits back the HTML for that patch, which you write out like any other expression in your template.
I have been further exploring the concepts of Test Driven Development of late, in particular around the ASP.NET MVC framework.
One concept that is very new to me is mocking. I have been using Rhino Mocks. This is not going to be a post about mocking, I am far much of a novice to offer any useful advice on this front just yet. However, it is pretty cool stuff and worth a read.