[FLOW3-general] Question about DDD

Jochen Rau jochen.rau at typo3.org
Sun Apr 8 13:26:51 CEST 2012


Hi Johannes,

On Sun, Apr 08, 2012 at 12:10:57PM +0200, Johannes Steu wrote:
> "If you want to display comments independently from their posts and blogs, you’d surely need a Comment Repository, too"

Not necessarily. You could also get all posts and iterate over them. But in most cases, having a dedicated repo is a performance gain.

> If i'd like to use a Comment Repository, will the model Comment still be inside the Aggregate?

Yes. You can nest aggregates. An aggregate like Comment can be inside another aggregate like post. Same Situation for Blog and Post

But if you have an aggregate Blog->Post->Comment, for example, a Post should only be accessed (referenced) through its Aggregate Root (the Blog).

Best
Jochen


More information about the FLOW3-general mailing list