Discovering use cases for switches
The first type of use case I want to explore is where functionality is turned off. This approach is sometimes called the kill-switch, circuit breaker pattern, or (to give a more positive spin) safety valve. The only place where you might want to employ this use of switches is where you have non-critical functionality that you might want to turn off.
It is not often that there is some functionality within your system where it would be acceptable for it to not be executed. However, this approach works when the product is in a bad place and there is a need to do whatever is necessary to restore some sort of normality to the application. With this in mind, I have experience of using kill switches on both frontend and backend applications, such as in the following scenarios:
- Encapsulating third-party scripts within the client: Often, websites and applications contain several third-party scripts that are used for tracking, telemetry, and analytics...