If you don't do this, you won't scale beyond a hand full of feature flags. Chrome has hundreds, for example.
If you don't do this, you won't scale beyond a hand full of feature flags. Chrome has hundreds, for example.
I'm thinking something like an initial (maybe massive) if block in the setup of the application that sets all of the behavior/features by declaring which implementations get set to which interfaces? After this if block, all of the DI stuff is set?
This of course means you need to use a DI framework of some sort.
Using feature flags is something I'm investigating because our current model is a git branch for every feature, and I wonder/fear it only works because we're a small team that has worked together for a while and in the future when we grow this will break down.
Basically there was one 'if' statement in the DI container configuration code that looked up a config. Basically
if (newPricingStrategy) bind IPricingStrategy to NewPricingStrategyImplementation else bind IPricingStrategy to OldPricingStrategyImplementation