Re: Sharing Aggregate Roots between Bounded Contexts
"wonderfulworldofpingpong" <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
Greg, thanks for the response. Are you advocating not to use a USER entity in every BC but any BC (Game/Food/Products) that needs to know the points make a GET CALL (query) to the Points management BC? That is possible. However, this makes the Game, Food, Products BC depend on the Points Management BC. You have to consider another important business rule here. That is, if the user does not have points he can't enter the section/stall. The Game BC can send an event to the points management BC, but the Game BC has to check the balance to allow or not the visitor. So the Game BC has to wait to complete the deduct points event, so to check the balance which makes the Game BC waiting. My understanding is that the events are for a pub/sub pattern like command processing and not for query. --- In [email protected], Greg Young <gregoryyoung1@...> wrote: > > Why not just make a call trydeductpointsforcstomer or get/remove points for > customer to points management? > > Or better make them all raise events? > > On Monday, May 27, 2013, wonderfulworldofpingpong wrote: ------------------------------------