But if the number of hooks being specified gets large, then the other approach can be easier on the module user. So I say "Why not both?".
For example, for each "hook" you could provide a default method that calls the user's hook if one has been specified, otherwise does the default processing. Then the user could override the hook either by registering a callback with the object or by defining a new class and overriding that method.
- tye (but my friends call me "Tye")In reply to (tye)Re: subclass or hooks?
by tye
in thread subclass or hooks?
by dash2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |