[TYPO3-ect] tx_base - tslib_pibase modernized

Elmar HInz elmar.hinz at team.MINUS.red.DOT.net
Mon Apr 2 10:28:06 CEST 2007


Hi Ernesto,

> Hi Elmar,
> 
> cool idea. The initial proposal also looks straight and good.
> 
> But I am not sure if this is a good idea, since this would inspire the
> continuation of plugins based on "old school" one class does it all. Do
> we want that? You state it is "for beginners", but couldn't we have some
> way that even beginners do it "right" from start (using lib/div)?
> 

I can't give an ultimative answer. 

Original Nuke and TYPO3 did quickly build up a large community of
developers of simple but usefull extensions. In both cases extension
development was not object orientated and the codebase itself was
spaghetti-code in the eys of professionals. Xoops, the first object
orientated nuke successor, didn't have the steep startup in this field.

So I believe that an all-in-one class for beginners does make sense, but
specially caching should be optimized.

> If we think it is needed to have this "simple" method for plugin
> development, we still have the issue of caching. Having a parameter
> "$noHash = FALSE" in the link generation method is not really of much
> help. I cannot think of any way yet, but there must be something that
> enforces better usage of USER of USER_INT even for "beginners". So I

My philosophy is that the complexity of caching with tslib_pibase is the
main cause of the beginners problems with caching. tx_base provides at
least 4 simplifications in this field:

1.) pi_USER_INT_obj setting becomes obsolete. The most confusing setting. 

2.) $pi_checkCHash should be set to TRUE by default (I see it's not
implemented yet.) So in doubt caching works simply by selecting USER.

3.) The many link functions are replaced with by unly 2: makeLink and
makeUrl. Both have the same parameter order.

4.) The names are less cryptic.

> think if kickstarter generates lib/div code with sample USER/USER_INT
> switches already, this is what beginners should learn and use.

Hmm, the switch is another level of complexity to understand. I see it
rather as an option for experienced developers.

Regards

Elmar






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