[Typo3-dev] OT: Hooks, was: Pledge fo 3.8.1

Robert Lemke robert at typo3.org
Fri Jun 3 13:43:15 CEST 2005


Hi Dimitri,

Dimitri Tarassenko wrote:

> Am I the only one thinking that "hooks" are a sign of bad decoupling
> in software? The more I look at how and where the hooks are used, the
> more I think that whenever a hook is required and implemented what
> really needs to be done is the method containing the hook needs to be
> split in several and one of these submethods should be iplemented in a
> subclass.

I fully agree. A true solution is refactoring the API and the underlying
code in a way that it can be used by an extension - but a quick solution to
make things possible is providing hooks.

I think that it's okay using hooks every once in a while because it speeds
up development. And it's not impossible getting rid of these hooks later
on, like it's also not impossible to change the API. With the methods of
Refactoring you have these options.

-- 
robert




More information about the TYPO3-dev mailing list