after thinking about it some more, this way definitely does make
more logical sense to me when it comes to integrating it into a
"Reloaded" type of setup via mount/component. even though i will
almost certainly never use more then 1 simultaneous view-system in any
given project.
if the view sig specified includes a namespace (even a nil one), then
use it for the subscription. otherwise, call namespace-fn to get one
to use in the subscription.
- if the view specified does not exist, throw an exception instead of
silently failing
- add "on-unauth-fn" option to view system. call this function if
subscription authorization fails (some applications may want to audit
this kind of event)
this init function only is suitable for non-distributed configurations,
but is probably still worthwhile to have something like this as it
helps remove boilerplate in applications where only a simple config
is needed anyway.
adding shutdown is mostly useful for applications using component/mount
another potentially contentious change.
the idea here is based on my inability to come up with a reason why
each library providing an IView implementation (e.g. views-honeysql)
would need a different function for this. in fact, i'd argue that it's
probably a better idea to have all the hints going to a single
"dispatch" function anyway (aka. this put-hints-fn) and have it check
for any metadata on incoming hints and do any custom processing there.
the IView implementation libraries have this ability already to add any
kind of custom metadata to hints anyway.
i don't think anything is lost by this change personally, and it
removes the need to call multiple functions to set a custom put-hints-fn
for each IView library that a project might need.
tl;dr - i like simpler configuration. this change is the beginning
of stuff that helps me do that in the future.
also as a nice bonus, this stops the debug log call here from spamming
up the log if the refresh-watcher thread is running on a frequent
timer interval