SuperJMN
SuperJMN

Reputation: 13992

Correct way to define Bounded Contexts?

I'm trying to practice Domain-Driven Design in a personal project. I have a sample domain that I'm trying to divide in Bounded Contexts.

I was almost sure that I knew how to do it, but after having defined them, I started to feel unsure about them.

How do I know that they are well defined? How could I determine if I'm doing wrong?

Upvotes: 0

Views: 294

Answers (1)

Eben Roux
Eben Roux

Reputation: 13256

Unfortunately there is no way to tell. There are no rules to determine whether a bounded context is correct or not. You will have to use the knowledge that you have about the domain and experience (with some trial-and-error) to get to where you need to be.

Even when modelling within a BC you'll find that you need to rethink some choices as you go along.

If you are feeling unsure then it is probably a sign that it may not be correct or that you need more experience within the domain. You may even require an additional BC or shared kernel. The point is that these things are tricky.

Remember that an AR in one bounded context may appear as a VO in another so that may throw you somewhat. Since it is a personal project you can implement what you have and play around with different ideas to see what fits better. However, since you may not have a well defined domain it may actually make it more difficult.

You may even find yourself in a situation where you have split into too many BCs so you may need to merge some artifacts.

Upvotes: 4

Related Questions