Amvionlie CMS
Where the Future Begins

Hook and Event Overview

Purpose

Hooks and events provide extension points without forcing unrelated systems to know too much about each other.

Hooks

Hooks are places where behavior can be extended or filtered. Use them for controlled extension points, not for hiding ownership violations.

Events

Events announce that something happened. They should carry enough context for listeners to respond without reaching into private owner state.

Good use cases

  • Notify another system that a record changed.
  • Allow a controlled list of additions to a render surface.
  • Let an addon contribute data to a central process.

Bad use cases

  • Using hooks to avoid route ownership.
  • Using events as a secret command bus.
  • Letting listeners mutate data they do not own.

Rule

Hooks and events are connectors. They are not a permission slip to wire the whole house through one light switch.

Updated: 2026-05-07 02:18:09