Deployment vs release
Traditionally, software teams deploy and release code changes at the same time: as soon as the code is deployed to servers, it's released to users. Developers test before release by deploying the changes to a staging server which is only accessible to testers. When software teams deploy and release at the same time, they can't test in production.
Although they often happen at the same time, deployment and release are different:
- Deployment: the loading of code onto the servers where it will run
- Release: the availability of code changes to users
At the beginning of this lesson, you changed the app between Dinosaur Mode and Space Mode by editing the code and changing the graphics the app loads. As soon as you changed and saved the code, the game was permanently in Space Mode. If your app had other users, they would see Space Mode as soon as you saved the code change, with no chance for you to test the change first.
But what if you wanted to deploy and test the change before releasing it to all users? That's where feature flags come in.
What is a feature flag?
A feature flag is a software development technique used to enable or disable functionality remotely without changing code. It is a decision point in code with varying behavior based on external input.
Feature flags help separate deployment from release, which lets you manage the full lifecycle of a feature.
Eliminate risk and deliver value
LaunchDarkly enables development and operations teams to deploy code at any time, even if a feature isn't ready to be released to users. Wrapping code with feature flags gives you the safety to test new features and infrastructure in your production environment without impacting end users.
When you are ready to release, update the flag status, and the changes are made instantaneously by our real-time streaming architecture.
However, when that release is made, the page still needs to be reloaded. Wouldn't it be great if the page could detect the flag change and update itself without needing to be reloaded?
On the next page, you'll add the code which gives the page that ability.