CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

David Hayden [MVP C#]

         .NET Tutorials, Patterns, and Practices

Applying Domain-Driven Design and Patterns Book Review

Just returned home from a nice long vacation at Universal Studios in Florida with the family. This is just what the doctor ordered as I feel much more energized and my nagging eye problems have now gone away.

I finished the final chapters of Appying Domain-Driven Design and Patterns With Examples in C# and .NET by Jimmy Nilsson. You can read my thoughts on the first 8 chapters here:

I thought I might be at a disadvantage by reading the last third of the book (Chapter 9+) a few weeks after reading the first 8 chapters, but such is not the case. The last third of the book is written mainly by guest writers on a number of useful subjects.

Chapter 9 offers you a glimpse of how to use NHibernate as a persistence framework for you domain model. This subject could fill an entire book, so if you are expecting a treatise on how to achieve the details of persistence using NHibernate you will be disappointed. The chapter is good, however, giving one some manner of detail as to how an O/R Mapper ( NHibernate in this case ) offers persistence to the domain layer and the various design patterns ( Identity Map, Unit of Work, Lazy Load, etc.) that come into play. Never do we get any detail about the Nilsson Workspace, which has been alluded to several times in the book, but I don't think it really matters.

Starting with Chapter 10 you get the pleasure of guest writers talking about 1) various design techniques to embrace when using Domain-Driven Design as well as 2) other domain models other than what Jimmy discusses. Let me just say that this is great stuff and I commend the guest writers. You've got some really good introductions on:

  • SOA
  • IoC and Dependency Injection
  • AOP
  • MVC Pattern
  • TDD of a Web Form
  • A Presentation Model

In the appendices, Mats Helander, Frans Bouma, and Ingemar Lundberg offer additional examples of Domain Models that really get you thinking about other approaches to domain model discovery and implementations at the end of the book. More great examples and discussions that give a whole new meaning to the word "Appendices." :)

Conclusion

The book is quite excellent as it offers much more needed detail than we got from Domain-Driven Design by Eric Evans as well as puts a number of design patterns in a bit more perspective in the given context. I considered this book an excellent buy as it is difficult to find books that talk about such a breadth of topics and bring them together in a very pragmatic manner.

Just a quick note that if you're looking for an end-to-end executable sample showing off Domain-Driven Design in action you will be a bit disappointed as the book doesn't go that far. You've got enough to build upon by reading the book, but it doesn't come on a silver platter.

That being said, I think the market is ripe for a person(s) to author a book that expands upon Jimmy's ideas. A book that implements and discusses the following design techniques mentioned above into an actual executable application using open source tools like NHibernate, Spring.NET, NMock, NUnit, etc., would be the icing on the cake and a sure winner.



Comments

Greg said:

I agree Dave (the market is also open for VB.NET explanations). Know a publisher? :)
# July 2, 2006 9:58 PM

Foxedup said:

I am in the middle of reading this book at the moment and while the content is good, I am finding the writing style quite hard going. Still I will persevere :)
# July 3, 2006 3:26 AM

Damien Guard said:

I found this book rather disappointing in many areas - a few of which I cover at http://www.damieng.com/blog/archive/2006/06/11/First_look_Applying_DomainDriven_Designs_and_Patterns.aspx

[)amien

# July 3, 2006 4:37 AM

Jason Haley said:

# July 3, 2006 10:13 AM

David Hayden said:

Damien,

I had read your points earlier when you commented on Frans blog. I think you're focusing on items that are more about coding styles and technical options.

Things like choosing to use public fields vs. properties, an underscore prefix for private members, static methods, reflection as an option for assigning private members, for example, are a developer's perogative and really have nothing to do with what the book is attempting to deliver.

I think if you get past the minor technical details of coding styles and look at the book from a more architectural perspective, you will be very happy with its content.
# July 3, 2006 10:40 AM

David Hayden said:

Foxedup,

The first half of the book does jump around a bit as Jimmy stops the flow of the current topic to define and clarify topics that he makes a passing remark about. I agree that the style is not really smooth when he does that, but I think Jimmy has the best intentions to make sure we are all on the same page and he doesn't assume we understand something when we might not.

I'll have to read the book at least a second time to make sure I digest it all :)
# July 3, 2006 10:50 AM

David Hayden said:

Greg,

Addison-Wesley, of course :)

As long as the author doesn't put both VB and C# in the same book so as to distract the reader with a ton of redundant code in multiple languages it doesn't matter what language the book uses.

I am more interested in the techniques of discovering the domain model, pragmatic discussion on why certain solutions were chosen, the implementation of design patterns, how business rules are spread throughout the application to invite domain model reuse, etc.

That would make a great book - complete with a CD with all the source code!
# July 3, 2006 11:05 AM

Damien Guard said:

I've stopped reading it for now and am going through Enterprise Design Patterns by Fowler.

There are plenty of my other points that are still valid regarding the first half of ADD.  In many areas so far he poses a tricky question and doesn't discuss potential solutions.

In other areas such as the TDD his tests seem far too granular and end up testing the implementation internals rather than the contract described by the interface as evidenced by his need to expose internals.  

I'll take a look at it again after I finish Fowlers book.

[)amien
# July 7, 2006 9:05 PM

Peter's Gekko said:

Me and my family spent our holidays camping in France. A swimming pool for the kids, a glass of wine

# September 6, 2006 1:59 PM

Dan Miser said:

# December 13, 2006 10:42 AM
Check out Devlicio.us!

This Blog

Syndication

News

CodeBetter.Com Home