DDD - How to design associations between different bounded contexts

前端 未结 3 1309
名媛妹妹
名媛妹妹 2021-02-03 12:33

I have setup a domain project which is being populated with an ORM. The domain contains of different aggregates each with its own root object. My question is how properties that

3条回答
  •  误落风尘
    2021-02-03 12:50

    It depends on what bounded context strategy you use.

    If you choose shared kernal, I think it's fine to have a direct relationship between them(direct reference or identifier reference, I believe someone else will explain the pros and cons in other answers). and you've also mentioned these objects integrated by database tables.

    But if you choose anti-corruption-layer, you'd better seperate them(use just identifier to keep the relationship), use adapter-translator to integrate(and no database integration).

提交回复
热议问题