[TYPO3-ect] Alternatives to TS

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Wed May 17 10:03:25 CEST 2006


Hello,

let's proceed one of the neverending discussions "TS successor".

By idea TS configures a plain PHP array. A PHP array can also be configured
by other configuring languages i.e. YAML, XML, plain PHP, etc.

Conditions:

One problems of most of this languages is, that they have no structures
that directly compares with TS conditions. The difficult thing with
conditions is that they works on a completely differnt level. It alters not
only one subpart of the PHP array like if-functions do, but all parts of
the array you put between the condition. You can't do this with YAML or
XML. You can do it with plain PHP by organizing the PHP array with
if-else-structures.

In YAML or XML you would need to spread the altering information all over
the tree in every points that you can put between one condition in TS.

How could this be soleved?

A solution could be to avoid TS like conditions at all and to use TS like
if-functions instead.



Organization in templates:

This is a second point discuss. TS can be organized in different templates.
If transform the whole TS to a PHP tree first and then to XML we lose the
Organization in templates.

TS -> PHP -> XML   or   TS -> PHP -> YAML

Could we technically transform template by template instead of generating
the whole tree first?


The trick with the dotted pair:

The most typical characteristic of TS are the "dotted string array pairs".

example = value 1
example.subexample1 = value 2
example.subexample2 = value 3

This leads to a pair of string and arrray in PHP:

$TS['example'] = ... some string ....
$TS['example.'] = ... some array ...

How would this pair be configured in YAML?

I guess the dot can't be used in the same way as part of a name.


Could anybody give an example.

How would this pair be configured in XML?


Regards

Elmar



















More information about the TYPO3-team-extension-coordination mailing list