[TYPO3-mvc] Alternative to hooks
Pascal Jungblut
mail at pascal-jungblut.com
Wed Jan 5 14:24:27 CET 2011
Hi guys,
I was wondering that now, having a nice and clean Framework to develop extensions, we'd eventually migrate from hooks to something that is more object-oriented. Don't get me wrong. Hooks work and they're very simple to use. However, I think every time you put a function-name concatenated with a filename into a global array that gets called by call_user_func.. a little kitten dies.
For example there is this great thing called Chain Of Responsibility [1] which is an OOP design-pattern that can, slightly modified, achieve pretty much the same as hooks do. Extbase could hold a class that manages these chains and provide basic interfaces to implement the pattern. If you guys have another good method to do this I'd like to hear it, but hooks always make me shiver - so I'm searching for a different approach. What do you think?
Regards
Pascal
[1] <https://secure.wikimedia.org/wikipedia/en/wiki/Chain-of-responsibility_pattern>
More information about the TYPO3-project-typo3v4mvc
mailing list