Bounded Contexts: Manage the Understandability of Your Systems

Bounded Contexts: Manage the Understandability of Your Systems

From Parnas' paper in the 1970's to microservices in the 2010's, we've always used modularisation as a way to manage complexity in software. And yet, we still end up with big balls of mud. Technical separation alone isn’t enough. We’ve also tried separating into business domains, but that’s not enough either: software wants to be deeply interconnected, spanning different domains, and doesn’t respect those boundaries.

Bounded Contexts provide an alternative to splitting on domains or on technical modules. We can separate by looking at the semantics. The domain models that underlie our systems, the language that is being used, and the meanings of the terms. We can draw “understandability boundaries”: separations that look at how concepts in our system are understood together (or can be understood autonomously). If we organise the teams along the same lines, then team members will need to understand fewer concepts to be productive. Teams will need less coordination with other teams. Having better semantic boundaries lowers the cognitive load.

Doing this kind of work is not free. But in the 20 years since the concept was introduced in Domain-Driven Design, we’ve developed patterns and heuristics to guide us.

Other Decks in Programming

Transcript

  1. Understandability of Your Systems Manage the Mathias Verraes verraes.net —

    @mathiasverraes Gien Verschatse gienverschatse.com — @selketjah
  2. Bounded Context: A set of domain concepts, language, model, and

    abstractions that form a coherent whole, deliberately bounded.
  3. A Bounded Context represents a consistent model and language with

    an explicit boundary. Bounded Context as a boundary of language, meaning, and co-understandibility
  4. Works both ways: working in the other contexts requires less

    knowledge of Ef fi ciency and vice versa
  5. How did we get there? People had abstracted them because

    on a super fi cial level they seemed similar
  6. Involves a lot of liquid (DNA, strains, chemicals) transfers from

    one container to another AND evaluate whether or not you were successful
  7. SO WE NEED TO ADAPT OUR PLANNED LIQUID TRANSFERS We

    don’t need to adapt our liquid transfers for building large pieces of DNA.