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
Over-egging a Framework
I was holding off on posting this, but read some other good blog posts which sort of went along similar lines to this so decided to post it now… What is a framework? Whenever you write a reasonably-sized application, you’ll probably end up writing some sort of bespoke “framework” in your application. When you start … Continue reading Over-egging a Framework
To TDD or not to TDD?
he Having read The Clean Coder recently, a section that really struck a chord with me discussed the application of TDD in projects as a day-to-day practice. The gist of the chapter was that when the pressure is on, and deadlines are creeping up – say either at the end of a big-bang delivery or … Continue reading To TDD or not to TDD?
Typemock Isolator Review – Part 4
In the final part of my review, I first want to go discuss SOLID in relation to Isolator, and then to wrap up the review. SOLID and Isolator I won’t go into details on what SOLID is – read the link above if you don’t know – but using Typemock Isolator allows you to write … Continue reading Typemock Isolator Review – Part 4
Typemock Isolator Review – Part 3
Having outlined the main features of Isolator, I want to now quickly do a simple comparison across the feature-set of the three frameworks, and then discuss how and when I think that Isolator might be a good fit for you. Note that I’m not discussing things like cost of the framework, or level of support … Continue reading Typemock Isolator Review – Part 3
Typemock Isolator Review – Part 2
In my previous post, I discussed what I called the “core” mocking features of Typemock Isolator. In this post I want to talk more about the features it offers over and above those of Rhino Mocks and Moq. Typemock-specific features Coming from a Rhino or Moq background, there are a number of methods in the … Continue reading Typemock Isolator Review – Part 2
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