Main menu:

Site search

Categories

June 2009
M T W T F S S
« May   Sep »
1234567
891011121314
15161718192021
22232425262728
2930  

Tags

Blogroll

Archive for June, 2009

Coding Tip #42: turning enums into classes

In Coding Tip #27 I explained how I rarely like to use booleans to represent states, and prefer to use an enum. Now that I have all nice little enums everywhere, another pattern that I see emerge is that I want more from my enum than just a value: perhaps other values associated with it, [...]

Canned, Stubbed and Mocked Fake Objects

I had a very interesting discussion with Jen Smith today about the differences in approach to faking objects during testing. As a result, I am finally putting down my thoughts on the matter. Canned Objects Canned objects are fantastic to use in situations where you want an object to respond with a predefined value or [...]

I don’t believe in ORM object as your domain model

I have been on a few projects now where we have used ORM libraries to help store our data (eg ActiveRecord for Rails, Hibernate (and it’s variants), Castle’s ActiveRecord for .Net). On these projects, we have used the domain models and the ORM models are the same. The problem we faced with doing so is [...]