How do I define aggregate and aggregate roots and link between aggregates

Course Queries Syllabus Queries 3 years ago

3.91K 1 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago


So I am new to DDD and I am trying to design an application correctly. But I am having a bit of difficulty with identifying aggregate roots.

My need is more or less a tree

*Customers
*Each customer can have 0 or more licenses
*Each license can have 0 or more courses
*Each course can have 0 or more lessons
*Each lesson can have 0 or more slides and videos

Finally I have quizzes/tests that can be linked to almost anything, even a certain time in a video in a lesson.

No matter how I think about it I only get that Customer will be an aggregate root for an aggregate that contains [Customer, License, Course, Lesson, Slide, Video]

But that is a fairly big aggregate and I have understood that big aggregates should be avoided.

A quiz would then be an aggregate with questions, answers and so on. As a second question I might ask is how the link should look? because lets say i want a quiz to pop up in a video after 4 minutes. Well then my quiz needs to link to that video and store a time. But that video is deep down another aggregate (under customer, license, course, lesson) and should not be linked directly in a persistent way from this quiz aggregate.

So how do I solve that. I have ordered my big DDD book but it wont be here for a while, If I could understand this before then it would be great!

I dont it should matter but I use .net c# mvc, with ef5 and repository pattern.

0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum