[TYPO3-v4] "CGL" policy for new hooks?

François Suter fsu-lists at cobweb.ch
Tue Mar 22 14:14:34 CET 2011


Hi,

Thanks for trying to reach a conclusion.

> What do you think?

IMO this defeats the purpose of interfaces. What's the advantage of 
using interfaces if the parameters are just stuffed inside an array or 
an object? This is exactly one "con" you mentioned against functions.

I have thought quite a bit about this topic recently. I tended to be 
rather pro-interface, because I liked the cleanliness of it. But after 
some thinking, I'm now rather pro-function. Indeed the whole point of 
hooks is to introduce flexibility in established processes. Hook are 
generally introduced for one particular purpose but are then often used 
later for other purposes. It's impossible - when adding a new hook - to 
guess what all these uses will be. Some such uses may require additional 
parameters. Using interfaces we lose this flexibility, which is the 
whole point.

Furthermore I think that it means adding a lot of interface files which 
bloat the source code eventually.

I would therefore vote to drop the interface approach entirely. To me 
the benefits are just not significant enough.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-project-v4 mailing list