[development] Eliminate hooks entirely in Drupal 6

Mark Fredrickson mark.m.fredrickson at gmail.com
Wed Jan 24 14:57:35 UTC 2007


> My favourite part of this technique is that it should make Drupal much
> more "deterministic" (?)... You can check your registered callbacks and
> have a much clearer idea of what will happen on any given function call
> instead of having to search through every single module and inc file to
> find something that looks similar to an invoke_all hook call.

-1 on a readability. Sure, it takes a couple of days to pick up the
hook concept, but now, I can pop open any text file and know exactly
what functions are going to be called when. With a registry, I need to
go ask Drupal when they will be called, return to the file, look up
the function call I want (which is going to be named
mymodules_silly_excuse_for_not_writing_hook_foo), ....

I remain skeptical of this plan. I welcome a patch and benchmarks, however.

-M


More information about the development mailing list