Binds / Bindables v1
Please provide feedback on the current hook/hookability system for future improvement.
-
! Must finalize terminology to differentiate between execution points and binds being added. -
Are CustomEventa viable refactor alternative to current code? Does it fulfill the same functionality, perf and ease of use? What are pros/cons. -
Need easier method to override 'default' binds, currently need to know ID #, which isn't static. Disable by function name? -
"Global" binds feel gross in a hard to define way. What could it be? -
bindExec-
security Because bindExecuses interface names, it can run hooks outside their 'native scope', ex. executing EVENT hooks outside the core EVENT module. What are the repercussions of allowing this and what's the alternative? -
Allowing execution points to have a default function seems practical at face value... -
I'm unsure if it should run only when none exist? If always, does it run before or after existing binds?
-
-
Is there a non-convoluted way to generate a default filter function name based on destination interface? Should every interface be forced to create its own filter from scratch? -
Current default bind filter matches either an exact string, OR at least one string in an array ( [].some). Is this a sane default?
-
-
Should it return the number of bind fns executed, instead of a boolean? -
Should there be some sort of enforcement of allowed types? Ex. perhaps an execution point only wants 'transformer' for a particular piece of data...
-
-
Ease of use -
In an older revision the destination object dstObjwas unnecessary (inferred viathis) because all HOOK functions were applied locally. What if we force destructuring to local scope? What's are gotchas? -
Aside for seeing bindExec(...)within source code, how can we improve visibility that "yes, this function has available bind points"?- Perhaps a JSDOC-like
@binds ['foo','bar']? - Build function to scan code and generate listing?
- Perhaps a JSDOC-like
-
-
bind()should it continue converting/splitting strings into arrays?- Is
['foo','bar']that much harder to type than'foo bar'?
- Is
-
Should optional addanddisablehave a return value? Would requiring boolean to signify continued processing be a positive change? -
Perf: Can't use a Setif we want easy bind 'removal' (eg. by priority ID), what advantage doesMapprovide? -
Are there any additional stats they should provide?
Edited by Lorin Halpert