[TYPO3-50-general] Templating Engine - Validation and Autocompletion

Malte Jansen mail at maltejansen.de
Tue Oct 28 23:30:34 CET 2008

Hi Sebastian,

Sebastian Kurfürst schrieb:
> Hey Malte,
>> If you have an model of an article you could add an @template-tag to the
>> class, which would provide a default template defined in a certain
>> folder with a certain, which will render the object as string
>> (MagicMethod __toString).
>> In most cases you'll have to render a model.
> As far as I see it now, your idea would lead to a mixture of concerns 
> (Mixing the "M" and the "V" in MVC) which is not really what we'd like 
> to do.
> However, what we might think of, is some automated scaffolding - where 
> the view and controller are autogenerated for a given model for CRUD - 
> Operations.
> I think this would be the cleaner way to archieve what you wanted to do :-)
> Greets,
> Sebastian

I would not see it as an mixing auf M V. It's just an direct 
communication from the M to the V, if you are using an Aspect. So you 
have your model in one location and somewhereelse the template/view.

Perhaps __toString might be the wrong the thing, but some function e.g.
+ model2View(Object $model): return view|string
should do it. IMO every thing else is overhead. So this might your 
automated scaffolding...



More information about the TYPO3-project-5_0-general mailing list