I read a DDD book

It didn’t take me long to read Implementing Domain-Driven Design (“IDDD book”) by Vaughn Vernon. This was the first book I’ve ever read on Domain-Driven Design. Perhaps this was not meant to be your first book on the subject, but I found it rather easy to follow either way. I did however need to skip ahead or go back from time to time, especially with Aggregates.

Basically everything in the book is essential and a must read for anyone building (modern) software, no matter what are tools you use or how complex your end users domain is. It covers a wide range of issues and solutions with excellent examples on a domain you most likely are already familiar: scrum.

I found this book after first watching Greg Youngs talk on CQRS and Event Sourcing (there might be a versions of the talk somewhere). I haven’t ever heard of CQRS or Event Sourcing before. I continued on to read posts on the subject, then read and realized the need for correctly modeling and understanding the domain in order to even consider event sourcing. Luckily I searched on Amazon for “domain driven design” a day or two after the book was released. Not that I haven’t heard of DDD before, it had already been on my list of things I needed to read on for far too long.

So what did I learn?

I have previously empahised effort on data modelling when it comes to design, as in “what properties does this entity have”, “could this be an immutable [value] object”, relationships between entities and what kind of (SQL) queries will be needed, perhaps in the way of “DDD-Lite”. I’ve seen that that’ll only get me to an application that you can’t continue developing. Many things become too difficult, and you just find yourself hoping for a rewrite. If you get a chance to rewrite, you’ll focus on something you previously screwed up totally but end up screwing up most of the other aspects in the process. Also, the end user will likely not be happy with either result.

Design should all start with the domain after all. We need to understand the reality our application is helping and being used in and build everything around that, like with the hexagonal architecture which is also discussed in the IDDD book.

I can’t claim that I fully grasp all of the concepts discussed in the book, but at least I know how things could be done in order to avoid the problems I’ve faced. Now, I guess I have to re-read the chapter on Aggregates once again.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: