I've started learning the principles of DDD and I'm currently trying to get a grasp of the concept of a bounded context. In particular, how do you decide just how big (or small) it has to be? Yeah, I know, as small as possible and as big as necessary (according to Vaughn Vernon).
Let's say I were to model a blog. I could then go and say there are 3 bounded contexts involved: 1) Front Page (featuring the most recent articles, no comments shown) 2) Discussion (a single article including comments) 3) Article Composer (where I compose an article).
However, this doesn't feel right (the ubiquitous language is the same for all of them), it seems as if I'm coming from a front end point of view and am still thinking in terms of view models or something.
Could anyone please point me in the right direction?
The central element of strategic designs is the Bounded Context. The underlying reasoning is that each domain model is only sensible in certain limits within a system. In e-commerce, for instance, number, size, and weight of the ordered items are of interest in regards to delivery, for they influence delivery routes and costs.
Vaughn Vernon in his book “ Implementing Domain-Driven Design ” states that Subdomains live in the space of the problem and the Bounded Contexts in the solution space. With this it is clear to differentiate that, Subdomains are logical “ separations ” of the domain and Bounded Contexts are technical solutions.
run-time perspective: bounded context represents logical boundaries which is defined by contract of service where the model is implemented. I hope this clarifies for you, the concept of Bounded Context in Microservices.
Now bounded-context closely relates to Domain-Driven-Design (DDD). DDD is explained in another article. This is where an application is partitioned into services where each aligns with a particular business domain. According to Vadim Samokhin, bounded context is a logical boundary.
A blog is not a good example for use of multiple bounded context. It's not really a "big enough" software example to warrant their definitions. DDD & BC's are really aimed at big/complex enterprising software systems.
Like you say, the aggregates always have the same meaning in your 3 examples.
I gave this example of Bounded Context in a previous answer, which I hope explains BC's and when to use them: Bounded Contexts and Aggregate Roots
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With