domain-driven-design

  • Ubiquitous language is a naming rule with teeth

    The idea is usually explained as “use the same words as the business”, which sounds like a style preference. The version with consequences is that a word meaning…

  • An event-driven seam between two services

    The synchronous call between two services was the reason both were down. Publishing an event decouples their availability — and makes eventual consistency a business decision.

  • Domain events belong to the aggregate that raised them

    Publishing an event from a service layer means the aggregate can change state without the event being raised, because the two are in different places and only convention…

  • An entity has identity; a value object does not

    Two customers with the same name are different customers; two amounts of 49.00 TRY are the same amount. That distinction decides equality, mutability and whether the thing needs…

  • Aggregate boundaries are transaction boundaries

    The rule that makes aggregates useful is that one transaction touches one aggregate. Everything else follows: what belongs inside, what is referenced by id, and where consistency is…

  • Context mapping before service boundaries

    Deciding services first and then discovering the relationships produces boundaries that cut through a transaction. Mapping the relationships first tells you which splits are cheap and which are…

  • Extracting a service without a rewrite

    The reporting code had one caller and a six-hour test run. Finding the seam, dealing with the shared schema honestly, and routing traffic gradually rather than switching.

  • A bounded context is a vocabulary boundary

    The word usually gets explained in terms of services and databases, which puts the mechanism before the reason. A bounded context is the region within which a word…