perhook
Perhook is a design approach in software engineering that assigns hooking points—callbacks or extension points—on a per-instance basis rather than globally. This allows each object, component, or module to expose its own set of hooks that can be customized independently of other instances.
Origin: The term combines per- with hook, indicating scope granularity. It emerged in discussions of component
Implementation: A perhook system maintains a per-instance registry of callbacks. When an event occurs, the system
Examples: In UI frameworks, perhook can let each widget define its own event handlers or analytics hooks;
Advantages and limitations: Advantages include isolation, customization, easier testing, and less risk of global side effects.
See also: hook, event listener, plugin architecture, per-instance state.