Chris Sainty

A technical blog covering full-stack web development.

twitter | github | stackoverflow

Posts about - asp.net

, , , , , ,

Tutorial: Nancy + MongoDb + AppHarbor

Time for a quick tutorial on how to get a site up and running on AppHarbor using Nancy and MongoDb.

Read More

, , , , , ,

Learn Something New: Nancy

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.

Read More

, , , ,

Learn Something New: Knockout JS

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.

Read More

, , , ,

ASP.NET MVC3 + Ninject + Moq + Unit Testing

I answered a question on StackOverflow yesterday which I am pretty happy with, so I thought I would share the link on here.

http://stackoverflow.com/questions/6646244/mvc-3-how-to-learn-how-to-test-with-nunit-ninject-and-moq/6646591#6646591

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.

, , , , ,

A RavenDb profiling plugin for Glimpse

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.

Read More

, , , ,

RavenDB Profiling with ASP.NET MVC

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.

Read More

, , , , ,

ASP.NET MVC: Unit Test File Upload with Moq

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.

Read More

, ,

ASP.NET MVC Application Layout

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.

Read More

, , ,

RenderComponent() or RenderUserControl()

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.

Read More

, , ,

ASP.NET MVC - Testing

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.

Read More