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

Software 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

Domain Modeling Gone Wrong – Part 1

How do you model a complex domain? In domain-driven design, you might think about entities, value objects, and aggregates when domain modeling. But how are you defining those? I will go over what a common modeling approach is but is backward. Let me explain why. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Ugh, Aggregates, Entities, and Value Objects Typical advice is to figure out what your aggregates are. You define entities and value objects and then group them together to define aggregates. Aggregates are a… Read More »Domain Modeling Gone Wrong – Part 1

Focusing on “Entities” leads nowhere good.

Focusing on data or “entities” can lead you to develop a system that is hard to change and, over time, littered with technical complexity. I will cover why you must think about your system’s behaviors and start being explicit. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Blinded by Data This video/blog was inspired by this post on Reddit. First, why is it fairly obvious that the “microservices” are a teacher, student, etc? That’s the first problem. It’s not obvious at all what “school app” does.… Read More »Focusing on “Entities” leads nowhere good.