Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Bibi @debugadora
Bibi @debugadora

Posted on

Feature Toggle or Feature Flag

These are two different names for the same practice, much like a light switch. When turned on, a feature is active; when turned off, it's inactive. This is a good technique for testing new features in a real-time production environment.

It's not just about hiding unfinished code; it's a way to alter the system's behavior and test new solutions without meddling with the codebase or project infrastructure.

A classic example: when a social network updates its interface, users have the option to "Enable" the new look or stick with the old one. Technically, this is facilitated by a feature toggle. Users simply activate or deactivate this little button called Feature Toggle/Flag as they wish.

This approach lends itself perfectly to A/B testing and experiments, allowing you to gather data and metrics to determine the most effective approach.

However, it should be used in moderation. Having a usability plan for Feature Toggles is crucial. Sometimes, toggles may not be the best option, especially if it's more expensive to implement a toggle than to simply rewrite the code. And if your application integrates with external services, carefully mapping out the toggles is necessary to avoid confusion.

It's often said that Feature Toggles are disguised technical debt, so it's essential to plan their end alongside their creation. Good Feature Toggles have an expiration date: if the solution is effective, it stays; otherwise, it's discarded. Best practices recommend having a limited number of active toggles in production to simplify code maintenance and ensure team sanity.

The use of Feature Toggles should be carefully analyzed because, after all, our mission as professionals is to solve problems and implement effective solutions.

In the Ruby programming world, tools like theFlipper gem simplify toggle management. If you know better alternatives, feel free to share!

For other technologies, it's essential to research the best tools for using Feature Toggles.GOOD USE IS LINKED TO A GOOD TOOL, here are some examples:

React/#"/leticiabibiano/feature-toggle-or-feature-flag-3i79/bmar11/post_body_bottom">

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software engineer & programming educator. Believes teaching is the best way to learn. Here to share knowledge & help. Enjoy!
  • Location
    Remote
  • Education
    University Cruzeiro do Sul
  • Work
    Software Engineer
  • Joined

More fromBibi @debugadora

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp