Bounded Contexts act as boundaries of Domain Concepts

Last Updated on Oct 03, 2022

A Bounded Context (BC) is a theoretical boundary within which concepts related to a model hold true without exceptions. Within the context, the Ubiquitous Language used to define a concept is always valid and correct. If one uses the Domain-driven Design pattern to develop applications, this theoretical model is manifested in reality, typically as Microservices.

Within a BC, there are no contradictions in the model or concepts. If there is confusion, either the concept has to be renamed (rarely happens), or a new BC has to be created. This occurs primarily due to differences that emerge in the Ubiquitous Language. To manage such distinctions, a single subdomain can contain more than one bounded context.

For example, a User in an Identity BC may relate to an actual person and hold attributes/behaviors associated with authentication and profile management. The same in a Book-keeping BC may relate to a bank account with a Cr./Dr. Balance. In a monolithic application, these two concepts would clash with each other. You are forced to either rename the former (Profile, User, ...) or, worse, collapse the different functionalities under one concept.

Drawing boundaries around concepts and their usage simplifies application development and aligns the technical implementation with the Ubiquitous Language. Even when common concepts are shared between BCs, they can be linked with a common attribute like a surrogate identifier.

© 2022 Ambitious Systems. All Rights Reserved.