try-catch-FAIL

Failure is inevitable

NAVIGATION - SEARCH

When Encryption Is Part Of Your Domain

We typically think of encryption as a cross-cutting concern or as a separate utility service that our applications use, not as something that’s an integral part of our application domain.  That way of thinking doesn’t always hold though.  In this short post, I’ll show you how I recently implemented support for encryption as a first-class citizen of my domain model.  The Domain Almost every application contains some element that needs to be encrypted or hashed (a user’s credentials, perhaps?).  In the past, I’ve never bothered encapsulating the encrypted value as its own ... [More]

Inversion of Control Containers - Things Every Senior .NET Developer Should Know, Part 3

If you tell me you’re a senior .NET developer, there’s a handful of assumptions I’m going to make about what you know.  The “Things Every Senior .NET Developer Should Know” series of posts will look at those things.  Today’s topic will cover Dependency Injection, Inversion of Control containers, and my favorite Inversion of Control container, StructureMap. More...

SpecsFor.com Launched, SpecsFor 2.2 Released!

The last month has been a busy one for SpecsFor.  I’ve added numerous new features to accommodate additional testing styles and to simplify testing challenges.  I’ve also been hard at work on a real site and some docs for SpecsFor.  I’m pleased to announce that SpecsFor.com is now live.  I’ve also shipped a new version of SpecsFor that simplifies the painful task of creating multiple mocks of the same type for injection into IEnumerable parameters. More...

SOLID - Things Every Senior .NET Developer Should Know, Part 2

If you tell me you’re a senior .NET developer, there’s a handful of assumptions I’m going to make about what you know.  The “Things Every Senior .NET Developer Should Know” series of posts will look at those things.  Today’s topic is everyone’s favorite set of principles, SOLID, a set of principles that can guide you towards creating more maintainable systems. More...

Yet Another Approach to NHibernate Session-Per-Method-Call Using StructureMap

There are several documented approaches you can follow to implement the session-per-method-call pattern with NHibernate and StructureMap.  The majority of these approaches fail to leverage the full capabilities of StrurctureMap and are therefore more complex than they need to be.  In this short post, I’ll show you how you can implement a simpler solution by utilizing StructureMap’s nested containers. More...