[TYPO3-50-general] FLOW3 and DDD
Nino Martincevic
don at zampano.com
Mon Jan 19 10:33:02 CET 2009
Hi Robert,
well, an Entity is always a member of an aggregate.
There is no such thing like an entity without aggregate (root)
Entities are only accessible through an aggregate root.
But there may be aggregates which consist just of one entity, a common
example is an Address or a Zip(code), if they are entities in your
domain model (btw. address should almost always be an entity...) or just
any other non-complex entity.
Another thing are value objects, they don't need to have an aggregate to
access them. They can be created and destroyed at any time, yes, but do
they make sense if they are not members of some entity and therefore
aggregate? Just now I would not have an example for this case.
And actually you don't and can't have a repository for value objects,
because they have no identity. How a repository would find them then?
Cheers,
Nino
Robert Lemke schrieb:
> Hi again,
>
> Am 16.01.2009 um 18:33 schrieb Karsten Dambekalns:
>
>>> Or are the examples, i.e. the blog example, build on the assumption
>>> that
>>> they are aggregate (roots)?
>> Yes, a Blog is considered to be an aggregate root in the example.
>> Simply
>> put: if for object of type "Thing" a repository "ThingRepository"
>> exists, it's an aggregate.
>>
>> Further support is missing right now, i.e. you will get in trouble
>> with
>> inter-aggregate references when persisting. This is on my todo list.
>
> What already exists though is some analysis which entities and value
> objects
> belong to which aggregate. Therefore if you create an entity or value
> object,
> it will only be persisted if it is connected to an aggregate (an thus
> a repository).
>
> Cheers,
> robert
> _______________________________________________
> TYPO3-project-5_0-general mailing list
> TYPO3-project-5_0-general at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-5_0-general
More information about the TYPO3-project-5_0-general
mailing list