Toggling Custom Features with Switches

slucero
robpowell

The concept of "Feature Flags" or "Feature Toggles" focuses on a method of changing code execution based on a single point that can be toggled as needed. Taking this a step further, the same point of activation could be dynamically managed.

The Switches module is a framework to create and manage feature flags, or switches, within an application in a clearly visible and maintainable way. Offering both manually configured and override-able switches and dynamic condition-based switches, this module offers flexible support in numerous scenarios including:

  • Continuous integration/delivery
  • Distribution/platform development and management
  • Beta release of features
  • Premium features
  • QA testing
  • A/B testing


Level of Knowledge

  • Site-builder: Attendees should be comfortable with installing modules and site-building configuration throughout Drupal.


Topics to be Covered
Join us in this session to learn what the Switches module has to offer as we explore the following:

  • The concept of feature flags
  • How the Switches module implements feature flags
  • Using manual settings and overrides to manage switches
  • Using conditions to manage dynamic switches
  • Customizing and extending Switches


Attendees Will Leave With...

  • An understanding of how feature flags may be used in project development
  • Awareness of the Switches module and how it can improve your workflow
  • Exposure to the possibilities of site customization using dynamic switches
  • Excitement to introduce the Switches module into the workflow gaps that weren’t recognized before


As a longer session…
As a longer session we’ll explore and introduce these topics beyond the content covered within the 30-minute format:

  • Live demonstration of creating and overriding manual switches
  • Live demonstration of using condition-based switches
  • Varying content output from Twig using switches
  • Exposure to the functionality of core’s Conditions API
  • Examples of existing contrib modules that can already extend switch conditions
  • Where the module is going and features coming soon
     

Program tags

architecture, back end development, site building

Experience Level

Intermediate

Drupal Version