[Typo3-dev] TypoScript - my point of view

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Thu Dec 1 14:07:12 CET 2005


Martin Kutschker wrote:
> * Storing of TypoScript
> 
> Naturally TS itself will be stored in it's native formar, which is text. 
> To speed up TS processing TS could be stored in such other format for 
> caching purposes. IMHO xml is a bad choice for cache data, PHP 
> serializing should be more efficient. But we must keep the conditionals 
> in mind!
> 

This seems to me one of the most difficult part. Condtitions are not 
correlated to the node tree nature of TS in any way. It has a rather 
linear nature.

In the range of a condition every TS property can be set, even from very 
differnt parts of the node tree together. If one want's to map this to 
an object tree of php objects, it is consequently necessary, that really 
each property of the objects can be set several times. One for each 
condition.

It needs to be implemented in a function in a common parent class. This 
would mean, that it will not be possible to set object variables 
directly, wich is a bad behaviour at all.

Every property of the objects needs to be accessed only through getter 
and setter functions. These implement the commen "condition" function, 
so that different values for different conditions can be provided.

I have currently no idea how this could be mapped to XML without the 
need to scatter conditioned values all over the document.  But I think 
it acceptable to set conditioned values in different places, if people 
get the advantage to use XML-IDEs for editing. I am sure differnt 
solutions are possible.

> * Formalizing Typoscript
> 
> IMHO the main problem of existing TS is that it has no formal 
> description. This shortcoming defies any reasonable debugging or editing 
> help like syntax highlighting or property tooltips (like in MS visual 
> studio, etc).
> 
> If a way can be found to describe the syntax and define the objects and 
> their properties, we can both validate the code and provide better 
> assistance.
> 
> I think that for this part xml is a good choice.
> 

You find a formalized description of the syntax in TSref. If you use OO 
you allready have it as XML. No this is not a joke. But it needs some 
further development.

Regards

Elmar



-- 
Climate change 2005: Teneriffa, NRW, Mexico, Guatemala, New Orleans, 
Sahel, Bangladesh, Spain, Portugal, Austria, Swiss, France, ...
Production of CO2 is killing people.
Production of CO2 just for fun is killing people just for fun.




More information about the TYPO3-dev mailing list