Sometimes we would like Develop new features but not expose them yet to users. Perhaps we need to expose them only to Qa, or by user role (such as admins).
Maybe we need some backend model to start gathering data and calculations from real production data but not expose this data in the view, while retaining the possibilty
Another use case can be rolling and exposing a feature only to a small sample of our users. We would like to get input from real usage pattens before we proceed with rolling a feature to all users..
For all those use cases we can use feature flags/feature toggle.
A feature toggle can toggled on or off, globally or sometimes according to a specific condition.
You can (and should) read more about the feature toggle pattern in Martin Fowler’s blog
Using “waffle” - a feature toggle framework for django¶
- Note that when you add a feature toggle in the code without adding in the db (through admin or command) then
- The feature toggle is considered closed