Book ReviewApplying Domain-Driven Design and Patterns

time to read 5 min | 881 words

Applying Domain-Driven Design and Patterns: With Examples in C# and .NET

Couple of disclaimers before I continue:

  • I got a free copy of this book to review.
  • I am probably not in the intended audiance of the book.

Nearly a month and a half ago, I posted my initial impressions from this book, which were good (even if it didn't come out like that). It took me quite a bit more to read it than the usual, mainly because I was swamped with work.

Anyway, the book declares itself as a guide to develop sofware using DDD. In fact, it covers much more ground than that, including patterns, inversion of control, testing, high and low level design, and more.

The overall tone of the book is very... relaxed. It felt at times like I was reading a long blog post, which meant that I had no problem with reading it on/off for a long time. The material is presented in a very approachable way, including a lot of details and explanations about what is going on.

I particularly liked the side notes where there are critiques on the code, some from Jimmy and some from other reviewers (This approach had this and that disadvantages, but I am using it because of the following reasons..., etc).

The first part of the book is an introduction to the concepts that are used throughout the rest of the book, patterns, TDD, domain concepts, etc. This was mostly repeating stuff that I knew, but it is a point to Jimmy's point that he managed to present the material in a way that was interesting even when I already knew what he was talking about.

The second part is where I consider the meet and bone of this book, covering how to apply DDD. The general architecture that is presented is similar to what I consider as ideal at the moment, and close to what I am trying to build in several applications at the moment. This part also straighten out some concepts that I didn't quite manage to understand from Evan's DDD book. Specifically, the relationships between the domain model and services and how to use them. I got several good ideas from this part, and it is responsible for my NHibernate Query Generator.

What I didn't quite like is the 7th chapter, about business rules. Partly this is because I'm currently invovled in an effort to implement fairly complex business rules implementation, and I don't think that the approach presented can hold in the face of the more complex scenarios. (Think of a case where you got heirarchical rules that are time dependant executing over a domain model that is timing sensitive. If you said Yuck!, I agree ;-)).

The forth part is talks about persistance, how to prepare to it, and how to implment it using NHibernate. I mostly agree with what was preseneted, and I was very surprised to learn new (and exciting) stuff about NHibernate (did you know that the mapping can declare Assembly and Namespace attribute seperatedly?).

The last part talks about moving the design forward, and how to take the domain design into the UI layer, and give the users a chance to take advantage of that as well.

What I didn't like:

Jimmy tries hard not to fall into the trap of using a specific product to show the concepts he is talking about. While it is a good approach in general, I felt at times that he is attempting it too hard. It might have been preferable to show the concepts using a certain tool, and mentioning how other products are solving similar problems.

There isn't any real refinement of the domain model as a result of new requirements or better understand of the client's model. The changes presented were changes mostly driven by technical decisions, not different way to understand the model.

Evans' DDD book made use of the shipping industry, with the difference being changing from focus on moving the cargo around, to moving the legal responsability for the cargo. I didn't see any such example in the book, and this is a core part of DDD.


I would like to work on applications developed using the principals shown in this book.

I don't think that the title is doing the book justice. It is not nearly about DDD as about the whole approach to develop applications.

I tried to pinpoint who exactly will not benefit from this book, and I couldn't quite put my finger on it. If you are currently busy building application based on Evans' DDD, with full usage of TDD and are familiar with Fowler's Patterns of Enterprise Applications, you will probably not get much out of this book.

If you are a "standard" .Net developer, and by that I mean that you mainly used Microsoft's prescribed tools and practices*, you will get quite a bit of insight from reading the book. I intentionally do not limit this to intermediate (whatever that means) developers, since it is more about a shift in thinking than about the level of code required.

I am certainly going to circulate this book to other developers in my team.

Great job, Jimmy.

* And I don't need to tell you what I think about most of them, do I?

More posts in "Book Review" series:

  1. (05 Nov 2009) The Wheel of Time – The Gathering Storm
  2. (11 Aug 2009) Yellow Eyes
  3. (24 Jul 2009) Watch on the Rhine
  4. (23 Jul 2009) By Heresies Distressed
  5. (23 Jul 2008) By Schism Rent Asunder
  6. (04 Oct 2007) Making Money
  7. (30 Sep 2007) Empire of Ivory
  8. (08 Sep 2007) Empire Of Man
  9. (01 Sep 2007) March Upcountry
  10. (21 Feb 2007) Programming WCF Services
  11. (09 Feb 2007) Windows Developer Power Tools
  12. (25 Sep 2006) Old Man's War
  13. (03 Sep 2006) His Majesty's Dragon / Throne of Jade / Black Powder War
  14. (30 Aug 2006) Applying Domain-Driven Design and Patterns
  15. (18 Aug 2006) Dzur
  16. (15 Aug 2006) When Darkness Falls
  17. (22 Apr 2006) Data Binding with Windows Forms 2.0
  18. (17 Oct 2005) Knife Of Dreams
  19. (28 Aug 2005) Working Effectively With Legacy Code
  20. (25 Jul 2005) Harry Potter and the Half-Blood Prince
  21. (14 Jul 2005) Sword of Ice
  22. (14 Jul 2005) Vows & Honor Trilogy
  23. (14 Jul 2005) The Mage Storms Trilogy
  24. (14 Jul 2005) Winds of Change
  25. (10 Jul 2005) Winds of Change
  26. (09 Jul 2005) Winds Of Fate
  27. (08 Jul 2005) Burning Water
  28. (08 Jul 2005) By The Sword
  29. (06 Jun 2005) Developer To Designer
  30. (05 Jun 2005) The Last Herald Mage
  31. (01 Jun 2005) Arrow's Fall
  32. (01 Jun 2005) Arrow's Flight
  33. (27 Apr 2005) Domain Driven Desing
  34. (01 Apr 2005) Exile's Valor
  35. (18 Jan 2005) Alta
  36. (16 Jan 2005) Coding Slave
  37. (13 Jan 2005) Hibernate In Action
  38. (25 Oct 2004) In Search of Stupidity