Browse by Tags

All Tags » .NET Development » Patterns (RSS)

Dependency Injection

Dependency Injection (DI) is a form of Inversion of Control where the instances that one class need are instantiated outside of the class an “injected” into it.  The most common injection is constructor injection.  This is called inversion of...

IDisposable and Class Hierarchies

In my previous post , I showed how the Dispose Pattern is effectively obsolete. But, there’s one area that I didn’t really cover. What do you do when you want to create a class that implements IDisposable , doesn’t implement the Dispose...

The Rat-hole of Object-oriented Mapping

Mark Seemann recently had a great post that, as most of his posts seem to do, challenges the average reader to re-think their reality a bit. The post is titled “Is Layering Worth the Mapping”. In the post Mark essentially details some of the...

Fluent Builders, Part 1

I’ve seen some conversations about fluent builders as of late, and I’d thought I’d post some information about fluent builders, the principles behind them, the problems they address, and how to implement them. Fluent Builder is a combination of the builder...

A Upcoming Pandemic of Domain Anaemia

There's a well-known anti-pattern called the anaemic domain model[1][2]. This anti-pattern basically says domain entities, chronically, have little or no behaviour (remember, object-oriented design is about attributes and behaviour). It should be...

Bridges and Factories

In my previous post , I talked about Dependency Injection (DI). One implementation of DI is using interface-oriented design to abstract a class from an injected dependency via an interface. This is one possible implementation of the Bridge pattern. Depending...

Dependency Injection

Dependency injection (DI) is a form of inversion of control. There seems to be a tendency in some circles to refer to dependency injection as inversion of control (IoC). Dependency injection is a form of abstraction by removing physical dependencies between...