Domain Event Pattern – Udi Dahan

by Brad August 13, 2009 15:54

Perhaps one of my biggest inspirations during my short programming career, has been Udi Dahan. Back at the start of 2008 I was lucky enough to attend one of his courses, organised by Simon Segal and covered by the company I worked with back then. His course introduced me to Domain Driven Design, true SOA, Inversion of control and much much more. A lot of it went over my head back then, but it fueled my thirst for knowledge of these wonderful mysterious technologies. It's only 18 months since, but the foundations he laid during that one week of training has helped me become a far better programmer than I could have achieved on my own.

Nearly 2 years on, and Udi is coming back(or at least that is the plan). Once again, Simon is the driving force behind this event.  But that is not the topic of this post. This post is about the Domain Event Pattern he described in this months MSDN magazine. I won’t bother going into detail, as the article has more than enough in it. Instead I will just provide code.

I took five minutes out of my day today to try this pattern out. If you are familiar with Udi’s NServiceBus project you will recognize the concept of Handlers. In much the same way a message is dispatched to a message handler, a domain event is dispatched to an event handler.

The code is available here for those who want to see it in action. I have removed the IoC component and only implemented the core concept for ease of understanding and due to time. I may build on it further at a later date, and may even drag NServiceBus into the mix, but for now, this will have to do.

DomainEvents.rar (9.89 kb)

Comments

1/4/2010 9:37:59 PM #

trackback

Domain Events revisited

Domain Events revisited

Bradley Boveinis

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen | Modified by Mooglegiant

About

This is the home of Boveinis Technology, and the personal blog of Bradley Boveinis. This blog is about the how, rather than the why of software development. The information provided here is provided on an as-is basis and is provided with no warranty or liability for damages resulting from its use.

RecentComments

Comment RSS

Blogroll

Download OPML file OPML

Visitor Locations