I have a system where a user answers question in a form. I have objects representing this model but I am not quite sure how to organize these objects in terms of DDD.
- Form (has its own list of) Sections;
- Section -> (has its own list of) Groups;
- Group -> (has its own list of) Questions;
- Question ->(can have its own list of sub-questions) Questions;
- Question -> (has its own list of) Answers;
- Answer -> (has its own list of) Answer_Details;
- Answer_Detail -> (potentially has its own list of sub details) Sub_Answer_Details.
Every object has more than 15 properties and each doesn't make sense without its parent. According to DDD, I believe that Form entity should be an Aggregate Root and all other objects should be value objects. That means I need a Repository only for Form entity. In this case FormRepository will be cluttered with all kinds of CRUD methods for child objects. Is my reasoning right in terms of DDD? Is that OK that I end up with a very extensive aggregate? I believe such representation can easily lead to performance issues.