Skip to content
Ninja Sha!4h edited this page May 24, 2023 · 6 revisions

Concept

What is a feature toggle?

Feature toggle is a mechanism that allows code to be turned “on” or “off” remotely without the need for a deploy. Feature toggles are commonly used in applications to gradually roll out new features, allowing teams to test changes on a small subset of users before releasing them to everyone.

How feature toggles work

Feature toggle is typically a logical check added to codebase to execute or ignore certain functionality in context based on evaluated status of the toggle at runitme.

In code, the functionality to be released is wrapped so that it can be controlled by the status of a feature toggle. If the status of the feature toggle is “on”, then the wrapped functionality is executed. If the status of the feature toggle is “off”, then the wrapped functionality is skipped. The statuses of each feature is provided by a store provider external to the application.

The benefits of feature toggles

The primary benefit of feature flagging is that it mitigates the risks associated with releasing changes to an application. Whether it be a new feature release or a small refactor, there is always the inherent risk of releasing new regressions. To mitigate this, changes to an application can be placed behind feature toggles, allowing them to be turned “on” or “off” in the event of an emergency.

Nuget Packages

FeatureOne - Provides core funtionality to implement feature toggles with no backend storage provider. Needs package consumer to provide IStorageProvider implementation. Ideal for use case that requires custom storage backend. Please see below for more details.

Backend Storage Providers

i. FeatureOne.SQL - Provides SQL storage provider for implementing feature toggles using SQL backend.

ii. FeatureOne.File - Provides File storage provider for implementing feature toggles using File System backend.

Clone this wiki locally