Feature management [prod]
[prod] - this CodeBud feature is also available in production mode.
What is feature management
Traditionally, shipping a new application feature requires a complete redeployment of the application itself. Testing a feature often requires multiple deployments of the application. Each deployment might change the feature or expose the feature to different customers for testing.
Feature management is a modern software-development practice that decouples feature release from code deployment and enables quick changes to feature availability on demand. It uses a technique called feature flags (also known as feature toggles and feature switches) to dynamically administer a feature's lifecycle.
Feature management helps developers address the following problems:
- Code branch management: Use feature flags to wrap new application functionality currently under development. Such functionality is "hidden" by default. You can safely ship the feature, even though it's unfinished, and it will stay dormant in production. Using this approach, called dark deployment, you can release all your code at the end of each development cycle. You no longer need to maintain code branches across multiple development cycles because a given feature requires more than one cycle to complete.
- Test in production: Use feature flags to grant early access to new functionality in production. For example, you can limit access to team members or to internal beta testers. These users will experience the full-fidelity production experience instead of a simulated or partial experience in a test environment.
- Flighting: Use feature flags to incrementally roll out new functionality to end users. You can target a small percentage of your user population first and increase that percentage gradually over time.
- Instant kill switch: Feature flags provide an inherent safety net for releasing new functionality. You can turn application features on and off without redeploying any code. If necessary, you can quickly disable a feature without rebuilding and redeploying your application.
Learn more about feature management here: https://learn.microsoft.com/en-us/azure/azure-app-configuration/concept-feature-management
Basic Feature Management with CodeBud
Feature management is done with remote settings object. You can edit remote settings on the Control tab in GUI. This object has no keys by default.
First, setup CodeBud project and pass project id to init method.
CodeBud provides you several ways to get Remote Settings state on client side:
remoteSettings getter
const remoteSettings = CodeBud.remoteSettings;
refreshRemoteSettings method
CodeBud.refreshRemoteSettings((remoteSettings) => {
console.log('Here remoteSettings', remoteSettings);
}
useRemoteSettings hook
You can learn more about this hook on this page