79323304

Date: 2025-01-02 09:37:09
Score: 2.5
Natty:
Report link

I would like to prepare primitive concept of e-commerce with Domain Driven Design architecture.

In order to make it I wrote down some behaviours and try to find first bounded context. A Propose is Menu bounded context with behaviours about adding category and product modification. I'm aware most of behaviour referes to CRUD opperations and to be honest I suppose It would be enough to implement but i would like to excercise DDD architecture for education goal . In Menu bounded context I try to determine some invariants to find aggregates with their consisency boundaries (like let's say max number of products in category).

Category aggregate with his own id plus reference id to product and Product aggregate with his own id plus local entities (let's nutritional values) are correct hierarchy OR maybe Category should be only aggregate and Product should be local entity belongs to him? If Product and Category are separated aggregates, remove a product should generate event to remove product id in catalog aggregate to keep eventual consistency?

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: bipis