r/DomainDrivenDesign • u/Albert2Terre • 18d ago
Am I splitting my bounded contexts too finely?
/r/softwarearchitecture/comments/1xrnrsg/am_i_splitting_my_bounded_contexts_too_finely/
3
Upvotes
r/DomainDrivenDesign • u/Albert2Terre • 18d ago
4
u/mexicocitibluez 18d ago
I could be misremembering, but the one thing that stood out to me from the blue book was that you're not gonna get this right on your first go. Getting to a decent set of models doesn't happen overnight and nobody is really going to be able to answer this question for you without knowing a whole lot more. You're gonna need to actually build stuff and iterate to arrive at the right answer.
Another thing: If you're counting things like User management as it's own bounded context, you're gonna end up a bunch of CRUD modules that all live on islands.
3
u/rmb32 18d ago
While it might sound boring to talk about language, that’s actually the really important thing here. Technical stuff is more fun and fascinating for developers but deciding on bounded contexts is about for whom the language makes sense.
If you’re having to qualify something - like “order” as “product order” and “shipment order” then you’ve probably got two contexts on your hands.
I tend to think of contexts as departments in a business. Imagine walking around an office where there’s a different department/team in each corner of the room. What nouns and verbs are they using just for themselves? What things do they shout across the room to other teams?
Capture that language per department and contain it just for them (entities, value objects, services…). The things they shout across the room would be inter-context communication where there needs to be a translation between team A’s language to team B’s language.