I'm going to use Anvil in my project.
https://github.com/square/anvil
But I can't figure out what is desired model of usage for it? Should I have a single global AppScope and merge all bindings from every :core
and :feature
module into it? Thus, every :feature
module adds it's bindings into AppScope, thus every :feature
knows everything about any other :feature
. This sounds messy, am I right?
I've not seen any possibility to have dependent scopes. For example, MyFeatureScope that depends on the AppScope. So only particular :feature
module actually contributes it's bindings into MyFeatureScope, but they still could use general-purpose bindings from AppScope.
does Anvil supports such dependencies between it's Scopes?
should I have one global AppScope? Or should I have a set of isolated scopes - one per
:feature
module - that could somehow depend on AppScope with "common bindings"?