Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Domain Driven Design

Double Dispatch in DDD

What’s Double Dispatch? Well, before we get to what it is, there is a common belief in domain-driven design that you want to keep your domain pure, meaning no dependencies, no services, no distractions. I get it because you do not want that core logic coupled to infrastructure concerns like database calls. You want it to be deterministic because you want it to be testable. But somewhere along the way this advice turned into dogma that you cannot inject behavior into your domain. I am going to challenge that. If you are modeling your domain and capturing behavior, you can… Read More »Double Dispatch in DDD

The Power of Ubiquitous Language in Domain-Driven Design

There’s one key aspect that can really unlock your understanding of domain-driven design: the ubiquitous language. It’s the secret sauce. Let’s explore some different ways of thinking about it that might just give you the big “aha moment” you’re looking for. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Be Aware of Terminology First, be acutely aware of the terminology and words used in any part of the organization. Words have different meanings depending on the context, and recognizing this can help you identify boundaries within… Read More »The Power of Ubiquitous Language in Domain-Driven Design

Domain Modeling Gone Wrong to Right

So, you are applying domain-driven design and want to define aggregates. Let’s go over ways to define them with an example domain, and you might be surprised by the outcome. Domain modeling is about capturing domain concepts not just as data and relationships but exposing behaviors. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Preface This is a continuation of Part 1, where I reviewed a common domain modeling approach, which I disagreed with and explained why. The TLDR is you cannot start domain modeling by… Read More »Domain Modeling Gone Wrong to Right