Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Ian Jenkins [email protected]

Slide 4

Slide 4 text

Feature Flag Toggle Flipper Switch Condition

Slide 5

Slide 5 text

A feature flag is a technique in software development that attempts to provide an alternative to maintaining multiple branches in source code (known as feature branches), such that a software feature can be tested even before it is completed and ready for release. Feature toggle is used to hide, enable or disable the feature during runtime. https://en.wikipedia.org/wiki/Feature_toggle Feature flags give a software organization the power to reduce risk, iterate quicker, and gain more control. Feature flags allow you to decouple feature rollout from code deployment. https://featureflags.io/feature-flag-introduction/ Feature Toggles (often also referred to as Feature Flags) are a powerful technique, allowing teams to modify system behavior without changing code. They fall into various usage categories, and it's important to take that categorization into account when implementing and managing toggles. https://martinfowler.com/articles/feature-toggles.html

Slide 6

Slide 6 text

Feature Flags are a software development technique that allows us to control the release of features independent of code deployment. This allows us to iterate quicker; testing features before they are complete to reduce risk and increase flow. https://www.boxuk.com/insight/coding-with-feature-flags/

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Types of Flags

Slide 10

Slide 10 text

● Experiment Flags ● Ops Flags ● Permissioning Flags ● Release Flags https://martinfowler.com/articles/feature-toggles.html

Slide 11

Slide 11 text

Experiment Flags ● Enable feature(s) for a limited number of users ● Measure the feature on vs the feature being off ● A/B testing

Slide 12

Slide 12 text

Ops Flags ● Gracefully degrade some functionality when under load ● Idea of a ‘kill switch’ for certain features

Slide 13

Slide 13 text

Permissioning Flags ● Turn on for a certain set of users ● Could be premium features for premium members ● Or, early access for those signed up to the beta program

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Release Flags ● Allow in-progress features to be checked into source control without affecting deployment ● Decouples the deployment from a release ● Enables Continuous Delivery

Slide 16

Slide 16 text

Continuous Delivery

Slide 17

Slide 17 text

Continuous Delivery is all about deploying little and often. This historically was a problem because you could have multiple developers working on multiple streams of work and you would find that one team might be ready to release one stream, but not the other.

Slide 18

Slide 18 text

● Wait for all development streams to be complete. This leads to a heavy, bloated deployment potentially containing lots of code changes and interdependencies. Often this is prone to bugs that often don’t show up until production, and a long and arduous deployment process. ● Work in separate release branches, so that each stream of work can be deployed independently. The problem here is it quickly becomes messy. You have diverged work, hot fixes you need to apply into multiple branches and a high risk of conflicts.

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

The 3 ways 1. The Principle of Flow The First Way requires the fast and smooth flow of work from Development to Operations, to deliver value to customers quickly. 2. The Principle of Feedback The Second Way describes the principles that enable the reciprocal fast and constant feedback from right to left at all stages of the value stream. Our goal is to create an ever safer and more resilient system of work. 3. The Principle of Continual Learning and Experimentation The Third Way focuses on creating a culture of continual learning and experimentation. These are the principles that enable constant creation of individual knowledge, which is then turned into team and organizational knowledge.

Slide 21

Slide 21 text

The Principle of Flow

Slide 22

Slide 22 text

Lead Time is the time between the appearance of a task on your project board and its progression to being marked as ‘Done’.

Slide 23

Slide 23 text

Cycle Time is the time that a task is in progress before being marked as ‘Done’.

Slide 24

Slide 24 text

In order to increase flow you need to reduce both lead and cycle time and get code into production as often and smoothly as possible.

Slide 25

Slide 25 text

Any work not on production is effectively in a queue and requires handover

Slide 26

Slide 26 text

Bigger Queues == Bigger Deployments == Bigger Risk == Lower Confidence

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Using Feature Flags in PHP

Slide 31

Slide 31 text

Symfony?

Slide 32

Slide 32 text

DZunke FeatureFlagsBundle https://github.com/DZunke/FeatureFlagsBundle

Slide 33

Slide 33 text

Flagception https://github.com/bestit/flagception-bundle

Slide 34

Slide 34 text

Laravel?

Slide 35

Slide 35 text

Feature Flags for Laravel https://github.com/ylsideas/feature-flags

Slide 36

Slide 36 text

WordPress?

Slide 37

Slide 37 text

Flagpole https://github.com/jamesrwilliams/flagpole

Slide 38

Slide 38 text

Flagpole ops flag ops flag ops flag ops flag release flag release flag release flag release flag experiment flag experiment flag Permissioning Flags - very basic for now, can ‘preview’ for your user

Slide 39

Slide 39 text

None of the above?

Slide 40

Slide 40 text

LaunchDarkly https://launchdarkly.com/

Slide 41

Slide 41 text

LET’S DO A RELEASE ON A LIVE SITE

Slide 42

Slide 42 text

Wrapping Up

Slide 43

Slide 43 text

● Feature Flags aren’t too difficult to implement, can start off basic ● There are multiple types of flags ● Release flags allow us to make use of Continuous Delivery ● Continuous Delivery helps reduce risk, gain confidence, deploy more often ● Plenty of good libraries out there to get going ● Releasing during a talk is a great/terrible idea (adjust depending on how it went)

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

Ian Jenkins [email protected] Thanks! https://www.boxuk.com/insight/coding-with-feature-flags/