BDD with MSpec and Rhino Auto Mocks (part 2)

In part 1, we looked at setting up MSpec and writing our first specifications. Now we get on to the all important implementation stage. We ended up with these basic specifications by the end of part 1. using Machine.Specifications;   namespace MSpecExample.Tests.Controllers {     [Subject("Product Search")]     public class when_product_search_page_requested     {         It should_return_product_search_page;     }       [Subject("Product Search")]     public class when_asked_for_products_matching_search_term     {         It …


BDD with MSpec and Rhino Auto Mocks (part 1)

I’ve long been a fan of test driven development in theory but in practice have experienced many of the issues which turn people off TDD and unit testing in general. Brittle tests which do too much, tell you very little about the meaning behind the code and are more a hindrance than a help when it comes to making changes …

Hello WordPress!

I’ve decided to switch my blog to WordPress. I’ll be using Windows Live Writer to write most of my posts and the excellent Paste as Visual Studio Code plugin to handle c# code excerpts.


Fluent NHibernate Gotcha

It seems today’s the day for me to make daft mistakes and then blog about them. If you’re using Fluent NHibernate (and there are many reasons why you should ;-)) and see this error message… An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.   * Database was not configured …

S#arp Architecture WCF Gotcha

We’ve recently adopted the excellent S#arp Architecture for our projects. I highly recommend taking a look at the project site. On Friday I created a simple WCF service using S#arp’s Northwind sample site for  reference. Using WcfTestClient I located my service and attempted to test one of the methods, only to get the following error. Could not load file or …


ASP.NET and JQuery MVC Menu Part 2

Other posts in this series: Part 1 Part 3 (AJAX) Slow progress is still progress don’t yer know First off, I can only apologise for the decades which have passed since I put up part one of this post, as it happens part two is extremely straightforward. To briefly recap part one, we introduced several helper methods that enabled us …


ASP.NET and JQuery MVC Menu Part 1

Other posts in this series: Part 2 Part 3 (AJAX)  One of the key differences between ASP.NET Web forms and ASP.NET MVC is that WebForms contained many controls which you could use on your web pages and MVC doesn’t. Not that this is a bad thing, the difficult thing about WebForms was the horrendous html they generated and the hoops …

Domain Driven Design: Thought of the day

Entities Entities are important. Maintaining the identity of an object is an important way to avoid data corruption. “Their class definitions, responsibilities, attributes and associates should revolve around who they are, rather than the particular attributes they carry” Eric Evans: Domain Drive Design – Tackling Complexity in the Heart of Software



I just had an interesting conversation with the co-editor of this blog which went something along the lines of… BigMart: I haven’t had chance to dig into LINQ properly but I don’t like it Me: But delayed execution rocks (follow long rambling explanation) BigMart: For our next project I won’t be using that MVC rubbish Me: But it rocks! OK …

MVC and good software design

Just found an excellent article summarising various software design principles/concepts in one easily digestible post. The series will eventually cover building a robust application using Microsoft’s ASP.NET MVC. http://weblogs.asp.net/stephenwalther/archive/2008/09/05/asp-net-mvc-application-building-forums-1-create-the-perfect-application.aspx