What are the different types of hooks? In an old blog post, Larry Garfield refers to "registry-style" hooks and hook_nodeapi type hooks.

When it comes to breaking down the different types of hooks, there doesn't seem to be any documentation. There is the big list of hooks and Tim Plunkett found two defgroups dealing with hooks, but there doesn't seem to be a formal breakdown of what different types of hooks we have.

What would such a breakdown look like?
I would group them in three, four groups, but there is no technical/internal difference between them. All are just functions that are called because of naming conventions.


Info hooks. Hooks that provide information about something, typical examples are hook_entity_info(), hook_field_info(), hook_hook_info() but also hook_permission(), hook_menu(), hook_theme(), etc. Many of these have a _info suffix but don't necessarly need to. These hooks can be called any time and the returned information is often cached (static cache or persistent cache) or stored to specific tables (e.g. hook_menu()).
Reactive/Action hooks. I just invented that name, but these are hooks which are called when something specific happenend like hook_init(), hook_node_save(), hook_user_save(), hook_node_view() and so on.
Alter hooks. Hooks that can be used to change something provided by other modules, exist for almost any info hooks (e.g. hook_menu_alter() or hook_entity_info_alter()) and also some action hooks (e.g. hook_node_view_alter()).


There is also a forth group but those are actually not really hooks and they are one of the main reasons for the typical confusion about hooks. They are often referred to as "Callbacks". This are "Hooks" which are only called for a single module, which owns something. Typical examples include node type callbacks (hook_submit, hook_view, hook_form, ...), many field hooks (e.g. hook_field_load()) but also hook_block_view(). There are plans to remove these and replace with something else (oop based) or rename them to something else than hooks.

I assume there are also some hooks that can't be correctly put in any of these groups or are a mix of those groups. If so, that might be a sign that they should be redesigned. If someone knows any examples, I can add it here.

Disclaimer: This is not official but how I see it. Use with caution. ;)