i struggling following scenario:
let's have user aggregate. user can create 1+ groups, messages, friends, photo galleries, etc. seems groups, messages, friends, photo galleries should each in own aggregates groupings. seems illogical create user entity contains ilist<> property each 1 of these sections opposed having user property groups, messages, friends, photo galleries, etc. approach makes sense ddd perspective? thinking entity hydration , seems make more sense groups, messages, etc. needed instead of retrieving user entity. recommended way handling scenario?
even without knowing particular business domain, sound wrong have user
class sort of god aggregate else underneath it.
grouping entities larger ones aggregate root how business works. instance, photogallery
aggregate root many photo
objects underneath it, or both photogallery
, photo
both separate aggregate roots.
for example might run photo development company, photos collected, handled , processed complete photogallery
(1 aggregate root).
or might run social networking site, photo
can shared , used commonly without needing load whole gallery (2 aggregate roots).
so it's , business domain dictates. can suck-it-and-see, try things 1 way , see how goes, refactor later.
Comments
Post a Comment