0

I'm studying Domain driven design (DDD), reading many articles, but never found a simple explanation. Please, help, let's say we have a design:

enter image description here

My bunch of question is:

  1. What is domain? ( where is domain depicted) on this pic?
  2. Where is aggregate on the pic? ( is it many objects or only one?)
  3. Is it right that Order is the aggregate root?
  4. Why LineItem is not an entity? (i'm asking, because here: https://softwareengineering.stackexchange.com/questions/351853/should-internal-entities-in-an-aggregate-respond-to-domain-events-directly) guys directly say that OrderLine is an entity
  5. Can DDD schema exists without CQRS? Should CQRS be applied to every part (domain? aggregate?) of the architecture
  6. Is Event Driven == Event sourcing?
  7. Is compensation required in DDD Event Driven/sourcing instead of distributed transactions, or can it be somehow exists without compensation (and without distributed transactions)?

I really googled and read articles, and these questions are raised in my head...

migrated from engineering.stackexchange.com Jan 12 at 13:58

This question came from our site for professionals and students of engineering.

5

What is domain? ( where is domain depicted) on this pic?

The whole diagram? it looks to be some of the parts of an domain responsible for managing orders.

Where is aggregate on the pic?

The purple boundaries are showing you aggregates - they would probably be referred to as an Order aggregate and a Customer aggregate.

Is it right that Order is the aggregate root?

The Order entity in this drawing is the root of the Order aggregate, yes. Is everybody going to model their ordering system this way? Not necessarily.

Why LineItem is not an entity?

Because that's the design that this particular designer came up with. Another might use an entity there instead. Either approach could be fine.

Can DDD schema exists without CQRS?

Yes. DDD came first; CQRS came about via distributed DDD.

Should CQRS be applied to every part (domain? aggregate?) of the architecture

No.

Is Event Driven == Event sourcing?

No. Event sourcing is about how we store data, and what follows from that. Event Driven is about reacting to messages, but says nothing about storage. You can do either without the other, or both together.

Is compensation required in DDD Event Driven/sourcing instead of distributed transactions

Review Life Beyond Distributed Transactions, by Pat Helland

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.