[TYPO3-mvc] Alternative to hooks

Jigal van Hemert jigal at xs4all.nl
Wed Jan 5 20:38:25 CET 2011


Hi,

On 5-1-2011 18:46, Martin Kutschker wrote:
> Am 05.01.2011 17:20, schrieb Sebastian Kurfürst:
>>
>> - Signals / Slots [1]: Good for *planned* extensibility, as it provides
>> very loose coupling.
>
> Looks like Event/Observer to me. Anway, hooks that allow for multiple hook implementations follow
> already in a crude way this pattern.

 From what I read about the C++ boost/signal library each connected slot 
received the original parameters. The additional bonus for the current 
TYPO3 implementation of hooks which allows multiple hook subscribers is 
that the parameters are passed from each hook subscriber to the next. 
This way all subscribers can do their own processing.

It could be done a bit nicer than global arrays to connect a function to 
a signal, but it's really not that bad.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh


More information about the TYPO3-project-typo3v4mvc mailing list