Pragmatism is an approach that prioritizes practicality and effectiveness in making decisions or solving problems. It doesn't necessarily mean giving up on principles, but it does emphasize flexibility and adaptability in the face of real-world constraints.

ChatGPT 4.0

I’ve been watching and studying Domain-Driven Design for a decade already. And it’s only now that I realized that I was on a very far right dogmatic spectrum of its tactical part. It was counterproductive, hard to scale across organization and especially hard to gain disciples.

So, I decided to let go of my entrenched views. I wrote down all the issues they caused. I stopped thinking of myself as an expert. Instead, I put myself in a DDD beginner's shoes and looked into a more pragmatic way of implementing it.

Most of the information on tactical DDD is heavily inclined towards .NET (or general OOP). In this study I will use FP flavored Scala with ZIO (which by coincidence is a library that adopted a pragmatic approach to FP in Scala).

Below you will find a list of topics that I want to cover. But it keeps growing as I write them one by one. The more you learn the less you know, right?

The Plan

  1. Entity creation
  2. WIP: Domain vs. Application Logic
  3. WIP: Domain Invariant Checks Using Infrastructure
  4. Transactions aka Unit of Work
  5. Reusing value objects in application layer API
  6. Modifying multiple aggregates
  7. WIP: Aggregate state encapsulation
  8. Authorization
  9. Partial aggregate loading
  10. Application services vs scenarios
  11. CQRS
    1. Building blocks of the command side
    2. Building blocks of the query side
    3. Domain logic on the query side
  12. Domain vs Integration Events and how to publish them

Entity Creation