[TYPO3-mvc] Blog Example and Value Object question

Martin Kutschker masi-no at spam-typo3.org
Tue Dec 29 12:31:59 CET 2009


Jochen Rau schrieb:
> Hi.
> 
> schrieb Franz Koch:
>>>> what if (to stay with the blog example) the blog posts shall be
>>>> displayed by a certain tag?
>>>
>>> I would implement a method "findPostsByTag()" in the Blog. It's okay to
>>> have find-methods inside a aggragate root domain objects as these act
>>> like a repository for their contained objects. You can iterate over the
>>> Posts and ask them "isTaggedWith()".
>>
>> Thanks for the info with findBy methods inside aggregate roots.
>> Iterating over posts seems a bit odd (and slow) to me thinking of some
>> more complex app then a blog, but I'll have a look.
> 
> Yoda said: "Work it make, then fast it make."

When is the time to make it fast? FLOW3/FLUID seems to be in the state of "make it work" without any
(???) thoughts about performance.

Assume that finding posts by tag is important for your application. Would you turn the tags into
entities, so you can ask the repository directly? Or has have the DDD books some aces in their
sleeves we don't know about yet?

Masi


More information about the TYPO3-project-typo3v4mvc mailing list