Skip to content

Instantly share code, notes, and snippets.

@tritowntim
Last active August 29, 2015 14:14
Show Gist options
  • Save tritowntim/3ed22cb9c41482c120a0 to your computer and use it in GitHub Desktop.
Save tritowntim/3ed22cb9c41482c120a0 to your computer and use it in GitHub Desktop.
edm-v2-ish.md

EDM "V2-ish"

Continued-ish


Let's Do A Big Bang Release!

...

Let's Not!

...

Let's Do Feature Flags!


What's a Feature Flag?

...

togglz


Feature Flag Gems

...

Rollout

https://github.com/FetLife/rollout

...

Flipper

https://github.com/jnunemaker/flipper

...


Built Custom Wrapper Over the Flipper API

...

seaquest


Feature Flags for Cohorts

...

|Staples Cohort|Users| |---|---|---| |Admin|7| |June 2014|195|

...

  • We can preview new features for the 7 administrators
  • Or create a cross-section of users by moving them to a new Beta Testers cohort...
  • ...before we flip on the new features for all 195 users

Create New Feature Flags

...

class FeatureFlag

  FEATURE_NAMES = [
    :light_layout, 
    :dashboard_and_subjects, 
    :next_lesson_button, 
    :goals
  ]

  ...

end

Administer 'Em

admin-ui


Use 'Em

...

class ApplicationController < ActionController::Base
  layout :layout_by_feature

  def layout_by_feature
    return 'application' unless current_user

    if current_user.feature?(:light_layout)
      'application_light'
    else
      'application'
    end
  end
  
  ...

end

Admins Can Switch Cohorts to Try Out New Features

cohort-switcher


Staples Has Been Flagged

staples-live


Don't Overdo It

the-homer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment