[TYPO3-dev] Fake / simulate frontend environment ( TSFE )

Steffen Kamper steffen at sk-typo3.de
Wed Nov 21 11:46:55 CET 2007


"Elmar Hinz" <elmar07 at googlemail.com> schrieb im Newsbeitrag 
news:mailman.1.1195640556.28548.typo3-dev at lists.netfielders.de...
>>
>> this solution is very limited, there are missing some inits. Maybe this
>> will fail on some typical FE-actions.
>> - global $TSFE doesn't make sense for me
>> -  // FIXME: ...  comment says more than i could say.
>>
>> Did you compared it with the spellcheck-method from rte?
>>
>> vg  Steffen
>
> Hi Steffen,
>
> I have seen the comment. That's why I underlined it's a quick approach.
>
> Roberts example does just enough to enable you to create a cObj, without
> setting up the full environment.
>
> Often you only want to use some tools from cObj, i.e. the typolink 
> function
> from within the BE. Unit testing is another example. Best if it doesn't
> depend on the environment, because a changing environment, does not give
> stable test conditions.
>
> In such cases you can avoid to set up the full environment. Guess it makes
> some difference in speed.
>
> Regards
>
> Elmar
>

Hi Elmar,

i understand the approach. The difficult is to know, which initialisation is 
needed for which function, that makes it really complicated.
Sure, for typolink/unit testing you need less than for image create or 
Content render.

Speed is a good point, but only useful if you really know what is needed. So 
every developer has to test if it fits and what he needs.
That's also the reason that everybody use his own working snippet, would be 
really nice to find a common solution - but for this complete understanding 
of TSFE is requirement.

vg  Steffen







More information about the TYPO3-dev mailing list