[TYPO3-mvc] Blog Example and Value Object question
Franz Koch
typo3.RemoveForMessage at elements-net.de
Mon Dec 28 17:04:25 CET 2009
Hi Jochen,
>> 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.
>> Don't the tags itself need to have an identity to resolve the
>> relations to the blog posts then?
>
> No. They don't need an identity in terms of DDD. Of course they have an
> internal identity (the uid). In Extbase these are the same, which is a
> little bit confusing.
Thanks a lot for info - yes it's kind of confusing, especially when you
read all the DDD tutorials, PHPCR and stuff from FLOW3 and now switch to
extbase which is handling stuff internally slightly different at some
points (which is obviously has to). But after the first finished extBase
extension it might feel quite more naturally thinking the ddd and
extBase way and I'm really looking forward to this point :).
--
kind regards,
Franz Koch
---------------------------------------------------
PayPal-Account: 'paypal _at_ elements-net _dot_ de'
---------------------------------------------------
More information about the TYPO3-project-typo3v4mvc
mailing list