Using Unity Call Handlers to compose logic


The most common use of Unity Call Handlers (or Interceptors) is for cross-cutting concerns. I’ve demonstrated the use of such handlers in the past for things such as logging or caching. However, there’s another use for these handlers that allows us to build reusable blocks of business-related code that can be composed together to act … Continue reading Using Unity Call Handlers to compose logic

Why I Hate the Template Pattern – Part 2


In my last post, I discussed in detail why exactly I don’t recommend the use of the Template for writing testable code. Here I want to illustrate an alternative to it, but before I do that, I want to talk about a more fundamental aspect of OO design. Inheritance vs Composition The way I see … Continue reading Why I Hate the Template Pattern – Part 2

Why I Hate the Template Pattern – Part 1


We’ve all been there and done it – written some code that at the time seemed great but you look back on it and think “why!”. I’m hoping to save you from at least one of those situations today with a brutal dissection of the Template pattern. Seductively, it offers you a quick and easy … Continue reading Why I Hate the Template Pattern – Part 1

Typemock Isolator Review – Part 1


I’ve recently been trying out the Typemock Isolator framework and thought I’d share my findings on it in a set of posts. Introduction Typemock Isolator (TI) is a mocking framework that you can use to help unit test your production code, just like the other popular mocking frameworks out there such as Rhino Mocks and … Continue reading Typemock Isolator Review – Part 1

Testing out the Entity Framework WCF RIA Services Domain Service


I’ve started using RIA Services lately and have been testing it out with an EF4 back-end. Generally I’m quite impressed with it, as it gives you several things out of the box that you normally would need to spend time coding otherwise: - Hosting of the WCF service IQueryable on the client Batch updates through … Continue reading Testing out the Entity Framework WCF RIA Services Domain Service