[TYPO3-project-4-3] Inline JS in Backend

Dmitry Dulepov dmitry at typo3.org
Sat Feb 7 15:07:36 CET 2009


Hi!

Steffen Kamper wrote:
> the situation with all the inline JS is really suboptimal. There are a
> lot of functions only for comatibility reasons, fixing JS bugs is very
> difficult, snippets are spreaded to many core files.
> 
> So i have an idea which one i would like to discuss.
> 
> What i suggest is a transparent solution:
> 
> * move inline scripts to external files
> * use 2 objects for inline:
> 
> TYPO3Backend.constants = {
>   var1 = xyz;
> };
> 
> TYPO3Backend.lang = {
>    label1 = xyz;
> }
> 
> These two obkjcts are easy to use inline in php without a big risk to
> create new bugs.
> 
> The external files are easy to maintain, better to see what we have etc.
> Old functions could be changed with new method or calling new functions.
> Functions can be grouped by functionality like it is done in php classes.
> You get a better overview what is used, what can be reused etc.
> 
> 
> What do you think?

Sounds like a good plan.

-- 
Dmitry Dulepov
TYPO3 core team
"Sometimes they go bad. No one knows why" (Cameron, TSCC, "Dungeons&Dragons")


More information about the TYPO3-project-4-3 mailing list