[TYPO3-dev] alwaysActivePIDlist

JoH asenau info at cybercraft.de
Tue Oct 24 11:51:43 CEST 2006


>> says who? - And for which reason?
>
> Say many people...
>
> One of the reasons is that there are too many properties and exact
> order is not clear (docs do not provide order for all properties).
> Often it is required to look to the code to understand how it really
> works.
>
> stdWrap is very powerful but it looks chaotic.

"powerful and chaotic" doesn't sound like "broken" to me.
So the question remains: How can we improve it instead of getting rid of it?

"Too many properties" can be "fixed" in two ways:
You can remove redundant properties (breaking backwards compatibility)
People can simply ignore what they think to be redundant.

To reduce the overhead you should simply replace the way the properties are
applied.
Currently it's a huge list of "if this then that".
For my extension I replaced this list with direct function calls. So there's
just a loop over the items that are in the array of properties and each of
them is executed as a real function (with the nice side effect that it's
easier to extend the functionality, since you got lots of different
functions instead of just one big monster)
One conceptual bug is, that this way of executing the functions means, they
are executed in the order they have been inserted in the TS-setup, while the
original version only uses the order that is determined by the "if-list" and
ignores the order inside the TS-setup.
So again backwards compatibility is broken.
On the other hand this enables people to simply use stdWrap.whatever for
each and every TS property.

So maybe we can improve this concept by fixing the bugs and removing some of
the redundant functions to really get a "fully blown stdWrap" ...

Anybody interested?

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com






More information about the TYPO3-dev mailing list