开发者

Physical organization of bounded context/aggregates

In the context of DDD how is everyone physically structuring their files/folders when it comes to bounded context and aggregate roots?

Does there need to be a physical representation of these or is it more just for discussions? I've tried to find evans and nilsson say something about physical layout but either I missed it or they don't discuss it.

I'm assuming you can't really represent boun开发者_StackOverflow中文版ded context in a physical layout as certain classes may be involved in multiple bounded contexts, but it still asks the question of aggregates and how you lay them out.


(I'm assuming you are talking about project/source/package layout, not about deployment and distribution of production components.)

Different bounded contexts should definitely be in separate packages and possibly separate sub-projects, otherwise I think it is too difficult (subjectively, I'd even say it's impossible) to really maintain the boundary. As for the classes that are involved in multiple bounded contexts, if it does not make sense to factor out the common ground, sometimes all you can do is to minimize the area of contact (probably by constraining use of classes from foreign contexts to the translation layer).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜