5 ms·
I'd like to know how you handle feature flags in a full feature web applications. In my experience, it's relatively easy and clean to work with `if(feature) th
by daddykotex 10y ago
I'd like to know how you handle feature flags in a full feature web applications.
In my experience, it's relatively easy and clean to work with `if(feature) this else that` in a simple backend application (a service that pulls from a queue and maintain a state, for example).
The problem arise when you start working with more complex applications.
Specifically application with complex UI where you have to check the state of the flag at multiple different places in the code. You end up adding branches all over the code, branches that will be removed once the feature is fully deployed and known to be correct.
It adds a lot of overhead, the code is less readable.
There must be a way to do implement feature flags in a smoother way.
- Walkman 10y agoThere are practices which can ease the use of feature flags. E.g. - Only a handful feature flags at a time. - When the feature is stable, delete from everywhere! - Easily turn on and off. - No branching makes it much easier.
- daddykotex 10y agoHow do you avoid branching?
- Walkman 10y agohttps://trunkbaseddevelopment.com/ https://trunkbaseddevelopment.com/
- dsr_ 10y agoThink of it as being exactly the same problem as "different customers have paid for different features". It's just that only the internal tester customer has paid for this new feature, so far. How do you handle that? You need a consistent permissions framework.
- daddykotex 10y agoThe thing is that in my experience, features behind flags, are not always a per customer artifact. Or maybe they should be and out implementation of feature flags should always take the current customer into consideration...
- skyrw 10y agoI believe LaunchDarkly (https://launchdarkly.com/ https://launchdarkly.com/) is trying to solve that. Still seems like a strange problem to apply a catch-all solution too however.
- jwatte 10y agoIt's easy to write, if you lay even a half way good foundation. It's easy to take out,too