[TYPO3-mvc] Blog Example and Value Object question

Martin Kutschker masi-no at spam-typo3.org
Mon Dec 28 23:27:38 CET 2009


Nathan Lenz schrieb:
> Franz Koch wrote:
>> what if the
>> tags shall be displayed as tag-cloud, 
>>
> 
> I'm interested in how this would work.  If Tags are Value Objects, then
> they can't be found by Repositories because they don't have an Aggregate
>  Root.  (As I recently learned from Sebastian a couple days ago.)
> 
> I can see how given Tag "A" you could get all the recipes and loop
> through returning only those that have Tag "A" assigned.
> 
> However, how would you list all the Tags?
> 
> I can see this being useful for at least two reasons off the top of my head:
> 
> 1. Tag Cloud
> 2. Tag "suggesting" while an editor is typing out a tag, the form could
> show hints of previously used tags.
> 
> (Maybe if you want to do this, then Tags shouldn't be Value Objects in
> your domain?)

It's interesting that a concept leads to strict rules. I understand now that a value object has no
intrinsic identity. Fine. But why on earth can't I ask for a list of all existing value objects of a
certain kind? Because a book says so? ;)

Masi


More information about the TYPO3-project-typo3v4mvc mailing list