0

I am new to DDD and I am trying model/design the aggregates of the following domain.

The domain consists of several concepts:

  1. Assessment Models (AM) which contain Enabling Elements (EEs) and Focus Areas (FAs). EEs also contain Generic Processes (GPs).
  2. Assessments (As) which contain EE Sub-Assessments (EESAs), FA Sub-Assessments (FASAs), and GP Sub-Assessments (GPSAs).

Domain experts conduct multiple assessments against specific assessment models.

The domain invariants are:

  1. The total weights of GPs in AM must equal 100.
  2. The total weights of FAs in AM must equal 100.
  3. As must cover all AM's EEs, FAs, and GPs. In other words there should be EESA for each EE, FASA for each FA, and GPSA for each GP.

I thought to make Assessment Model and Assessment as my aggregates. However, I feel that they will become big and deep (e.g. 3 levels AM -> EE -> GP) that may hinder the performance. A typical AM would contain 15 EEs, 6 FAs, and 40 GPs. The As will also reflect the same hierarchy.

Also, how do I reference for example GPs from GPSAs?

Thank you.

UPDATE: I have included some of the expected behaviors for the domain in hand to provide context:

  1. Publish a new assessment model with specific weights assigned to its components (EEs, FAs, and GPs).
  2. Conduct a new assessment against a published assessment model with specific scores (0.0 to 4.0) assigned to each component of the assessment model (EESAs, FASAs, and GPSAs).

There are more behaviors but these are examples.

1 Answer 1

4

You should start by modeling behavior instead of modeling details.

The relationship model people often seem to start with is irrelevant. A relationship model, especially if it's just data, is completely useless in itself. Relationships (and data) appear organically because of behavior that needs them, not because some "inherent" properties of the domain.

Case in point, you're concerned with how this all will perform. You should start with modeling out the behavior you want to support, then you can create an optimal model for those cases in whatever object hierarchy is optimal for that case. This could be even a different "model" for each case.

Now, I couldn't say whether that is DDD or not. I've read the book, listened to Eric Evans' talks. I came away with the feeling concentrating on the domain, very much including its behavior is inline with DDD. There are other schools though, so your mileage may vary.

1
  • Hi and thank you for passing by. I have update my OP with examples of domain behaviors. I hope this will help to add some context.
    – geeko
    Aug 10, 2021 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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