Re: Confused about Bounded Contexts and SubDomains
James Zhuo <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CANxFbYDqQ=zRoXoo=VncK+5yd-xgzk1hkUYYa84E5vX_ertYzg@mail.gmail.com> |
I haven't read through the whole book by Eric, but i think i understand the concept of BC rather well and what DDD in general is trying to do. IMO, I believe a BC should map to a Sub-domain on a one-to-one basis as well. E.g. Account Payable (AP), Procurement, Inventory etc etc. E.g. the concept Product may be used very differently in each of these sub-domains. In an AP system, the Product might have an item code, description and a cost at the time of the purchasing and that's all it needs to be. In fact the description is often a combination of several attributes that you would find say in a Procurement system (e.g. description, colour, size). In Procurement, the product is part of a product catalogue and the information it contains may be used to help users identify the product, in this case the product model may have a picture of the item, something the AP domain wouldn't ever be interested in. Similarly for the inventory system, the main purpose of the Product entity is to keep track to see whether an item is available in stock, so in this system, the price of the product is not necessarily important. Hope that helps and would love to discuss. James Z