[TYPO3-dev] RFC: Change roadmap for 4.5 and 5.0

Michael Scharkow michael at underused.org
Tue Apr 11 15:32:00 CEST 2006


Ries van Twisk wrote:

> Why not do it object oriented?
> class html  {
>  function getTag_Img(....):
> function getTag_Br() { return '<br>';}
> }
> 
> class xhtml  {
>  function getTag_Img(....):
> function getTag_Br() { return '<br />';}
> }
> 
> class xhtmltrans extends xhtml  {
>  function getTag_Img(....):
> function getTag_Br() { return '<br />';}
> }

Hi Ries,

I predicted somebody would call for a getTag_foo method ;) HTML has 
exactly how many tags, in which versions? I guess you'd have to 
implement *all* of them for consistency, adding another N constants to 
the namespace.

What about at least a generic write_html($tag, $attributes, $content) 
method that knows about closing tags, etc. Easier to memoize for me at 
least...

Still, I'd much rather have *no html* at all in any code, so output is 
entirely template-driven, which is *much* easier to maintain, because 
you only edit more-or-less plain HTML. For that we need either 
post-processing or separate templates.

Greetings,
Michael




More information about the TYPO3-dev mailing list