Hey there,
I've been reading up on DDD and I'm trying to understand the way the example is structured.
So first, with the aggregates folder: Is an aggregate here equivalent to a DDD aggregate?
I was wondering about value objects and entities and how they should be represented. I assumed that idea, project, and user are each a root entity inside some aggregate, with value objects maybe added directly from the event, without being explicitly modeled in the domain.
But then I looked at the projections folder and saw that projects and ideas are properties of the user which made me think that maybe user is the root entity and idea and project are additional entities inside the same DDD aggregate, and that maybe aggregate here means something different.
Moving on to projections: projects and ideas are initialized as empty arrays on the userRegistered event. Is that where default/initial values should be set? and not in the defaultState of the aggregate?
Thanks so much for your patience and sorry if these questions are really annoying 😜
Hey there,
I've been reading up on DDD and I'm trying to understand the way the example is structured.
So first, with the aggregates folder: Is an
aggregatehere equivalent to a DDD aggregate?I was wondering about value objects and entities and how they should be represented. I assumed that
idea,project, anduserare each a root entity inside some aggregate, with value objects maybe added directly from the event, without being explicitly modeled in the domain.But then I looked at the projections folder and saw that
projectsandideasare properties of theuserwhich made me think that maybeuseris the root entity andideaandprojectare additional entities inside the same DDD aggregate, and that maybe aggregate here means something different.Moving on to projections:
projectsandideasare initialized as empty arrays on theuserRegisteredevent. Is that where default/initial values should be set? and not in thedefaultStateof the aggregate?Thanks so much for your patience and sorry if these questions are really annoying 😜