[TYPO3-mvc] Object Accessors & lazy object loading
Frank Mey - NEW.EGO
mey_mailings at newego.de
Fri Apr 8 15:55:14 CEST 2011
Hi,
you are right Franz.
It's my first extbase extension with table relations and i took the data
field names mainly from the old database :).
I will probably change the field names accordingly, haven't done many fluid
templates yet and search/replace is my friend then :).
Have a nice weekend,
Frank
> -----Original Message-----
> From: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-
> project-typo3v4mvc-bounces at lists.typo3.org] On Behalf Of Franz Koch
> Sent: Friday, April 08, 2011 1:32 PM
> To: typo3-project-typo3v4mvc at lists.typo3.org
> Subject: Re: [TYPO3-mvc] Object Accessors & lazy object loading
>
> Hey Frank,
>
> > that debug-Thing is obvious to me now, thx :).
>
> when thinking about it it's probably obvious, but we need again a working
> debugging solution. Have to discuss that with the others. If anybody knows
> how we can hide properties from debug calls just drop a note.
>
> > Ok, here is the fluid part:
> >
> > <f:for each="{heft.heftZuArtikel}" as="artikel">
> >
> > <h3>{artikel.artikelZuBereich.bereichDescription}</h3>
> ...
> > <span>{artikel.artikelTitel}</span>
> ...
>
> wow, you really named the properties "heftZuArtikel" and
> "artikelZuBereich"? That's not very intuitive and should probably be
changed
> for a clean and understandable Domain language.
>
> First, a "artikel" doesn't belong to "artikelZuBereich", but it belongs to
a
> single "Bereich". And inside the "Bereich" object it's obvious that the
> "bereichDescription" belongs to the "Bereich", so it could be just named
> "description".
>
> So instead of {artikel.artikelZuBereich.bereichDescription} better would
be
> {artikel.bereich.description}. And instead of {heft.heftZuArtikel} a
> {heft.articles} would be more natural.
>
> As a rule of thumb you just have to imagine that you would personally
> interact with the objects and could talk to them, and then name the
> properties how you would have ask for them.
> Example: You wouldn't ask a {heft} to give you all {heftZuArtikel} but
rather
> "Hey heft, could you give me all your articles" - so name it "articles"
(it's a bit
> unlucky that plural and singular are the same for "Artikel" in German).
>
> --
> kind regards,
> Franz Koch
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list