SlideShare a Scribd company logo
Anand Agrawal
Feature branches
&
Continuous Integration
Feature Braches
Trunk
Developer A
Developer B
 Pros
 Code for new feature could not make to
production
 No fear to check-in in branch
 Cons
 Merge hell
 Fear of refactoring
 Difficult to share code across branches
Continuous Integration
 Pros
 Avoid big merges
 Each check-in is production ready
 Continuously Integrate thorough out the
progress path of the feature
 Cons
 Incomplete feature may go to production
 Fear to commit code
Then how to do Continuous
Integration?
Feature Toggles
What are toggles?
It’s a simple if statement
Feature toggle is a if
statement that hides certain
execution path
Types of Feature toggle
 Release toggles
 Business toggles
Release Toggles
 To hide incomplete feature
 Short lived
 Removed as soon as feature is ready
 Have pre-decided values across
environments (except dev)
Business Toggles
 To enable A / B testing
 Release feature to certain groups of
people to get early feedback
 Could be enabled or disabled on the fly
Testing the Toggles
 Unit Test
 Test for both conditions i.e. toggle on and off
 Integration Test
 Test with toggle states that are going live
 Test with toggle on
 With business toggles be smart about what
you want to test than try and test all
combinations
Tips and tricks to implement
Feature Toggle
In case of building new API end
point that is not public facing
No feature toggle needed
In case of creating new
model or table
No feature toggle needed
In case of adding a new column
in database and exposing it
through service
No feature toggle needed
May feature toggle validations
or provide default value
In case of new endpoint that is
public facing
Just feature toggle the url
In case of UI component
embedded in existing page
Feature toggle the view
element
In case of logic change like
change the way payment is
processed
Feature toggle by abstraction
Things to keep in mind
 Don’t try to toggle each and every line of
code. Use only where its needed.
 Keep the number of toggles under
control
 Try to create mutually exclusive toggles
 Clean up release toggles and dead code
Ways to implement toggles
 Config file
 Toggle manager for Admin to manage
 Cookie store
 … or whatever that makes sense
They are riding on the same
boat
Feature Toggle is second best
solution. The best solution is to
find a way to gradually
integrate, without Feature
Branches or Feature Toggles.
Martin Fowler
No free lunch
 Good test suite (unit and acceptance)
 Fix or Revert the breaking change
immediately
 Break down features into smaller stories
 Break down stories into smaller tech
tasks
 Think of how to take your code to
production everyday than creating
blockers
References
 http://martinfowler.com/bliki/FeatureToggle.html
 http://www.infoq.com/presentations/Feature-Bits
 http://blog.pluralsight.com/favor-feature-toggles-
over-feature-branches
 http://paulhammant.com/blog/branch_by_abstracti
on.html
 http://labs.spotify.com/2014/03/27/spotify-
engineering-culture-part-1/
Questions ?

More Related Content

PDF
Feature Toggle
PDF
Feature toggling
PPTX
Feature Toggles
PDF
Git flow
PPTX
BDD WITH CUCUMBER AND JAVA
PDF
Trunk based development for Beginners
PPTX
Git and GitFlow branching model
PDF
Git Series. Episode 3. Git Flow and Github-Flow
Feature Toggle
Feature toggling
Feature Toggles
Git flow
BDD WITH CUCUMBER AND JAVA
Trunk based development for Beginners
Git and GitFlow branching model
Git Series. Episode 3. Git Flow and Github-Flow

What's hot (20)

PDF
Hexagonal architecture: how, why and when
ODP
BDD with Cucumber
PPTX
Git branching strategies
PPTX
Jira fundamentals
PDF
Introducing Clean Architecture
PPTX
GIT presentation
PPTX
Jenkins CI
PPTX
Steering the Course with Helm
PDF
Git flow Introduction
PPTX
Feature flag launchdarkly
PDF
A Separation of Concerns: Clean Architecture on Android
PDF
Git Branching Model
PPTX
Introduction to Feature Toggle and FF4J
PPTX
Cucumber BDD
PPTX
Trunk Based Development in the Enterprise - Its Relevance and Economics
PDF
Trunk based development
PDF
Git workflows
PDF
Gitlab, GitOps & ArgoCD
PPTX
A successful Git branching model
PPTX
Clean architecture
Hexagonal architecture: how, why and when
BDD with Cucumber
Git branching strategies
Jira fundamentals
Introducing Clean Architecture
GIT presentation
Jenkins CI
Steering the Course with Helm
Git flow Introduction
Feature flag launchdarkly
A Separation of Concerns: Clean Architecture on Android
Git Branching Model
Introduction to Feature Toggle and FF4J
Cucumber BDD
Trunk Based Development in the Enterprise - Its Relevance and Economics
Trunk based development
Git workflows
Gitlab, GitOps & ArgoCD
A successful Git branching model
Clean architecture
Ad

Viewers also liked (20)

PPT
Waltzing with Branches [ACCU]
PDF
Feature Toggles On Steroids
PPTX
Feature Toggle XP Conference 2016 Kalpana Gulati
PPTX
Why we used Feature Branching
PPTX
Webinar: Automate Your Environment Provisioning for Mobile App Development
PPT
Version Control - Patterns and Practices
PPTX
Service Virtualization: Delivering Complex Test Environments on Demand
PPTX
Cisco and Splunk: Under the Hood of Cisco IT Breakout Session
PPTX
Webinar: Is Your Storage Ready for Disaster?
PDF
Google Wallet: The Fanatics Experience
PDF
[@NaukriEngineering] Feature Toggles
PPT
Chrome release cycle
PDF
[@NaukriEngineering] BDD implementation using Cucumber
PPTX
Entregas Contínuas com feature toggles
PPTX
Pull requests and testers can be friends
PDF
Who will test your tests?
PDF
Continuous Visual Integration - RailsConf 2016 - Mike Fotinakis - Percy.io
PDF
Overcoming the fear of deployments
PDF
Continuous Integration, Delivery and Deployment
PDF
Refactoring for Software Design Smells - Tech Talk
Waltzing with Branches [ACCU]
Feature Toggles On Steroids
Feature Toggle XP Conference 2016 Kalpana Gulati
Why we used Feature Branching
Webinar: Automate Your Environment Provisioning for Mobile App Development
Version Control - Patterns and Practices
Service Virtualization: Delivering Complex Test Environments on Demand
Cisco and Splunk: Under the Hood of Cisco IT Breakout Session
Webinar: Is Your Storage Ready for Disaster?
Google Wallet: The Fanatics Experience
[@NaukriEngineering] Feature Toggles
Chrome release cycle
[@NaukriEngineering] BDD implementation using Cucumber
Entregas Contínuas com feature toggles
Pull requests and testers can be friends
Who will test your tests?
Continuous Visual Integration - RailsConf 2016 - Mike Fotinakis - Percy.io
Overcoming the fear of deployments
Continuous Integration, Delivery and Deployment
Refactoring for Software Design Smells - Tech Talk
Ad

Similar to Feature toggles (20)

PDF
apidays Paris 2022 - Agile API delivery with Feature Toggles, Rafik Ferroukh,...
PPTX
Lean Kanban India 2015 | Branching for Continuous Delivery? Think Again! | De...
PPTX
Trunk-based Development with Feature toggles
PPTX
Is your code Toggled?!? By Devi Sridharan & Siddhartha Deshpande
PDF
Trank and branches for configuration management
PDF
Recipes for Continuous Delivery (ThoughtWorks Geeknight)
PPT
Web Speed And Scalability
PPTX
Continuous feature-development
PDF
Feature driven development
PDF
Feature toggles share on Ruby Tuesday@Shanghai
PPTX
devops certification
PPTX
devops certification
PPTX
Continously delivering
PDF
Branches are for Trees. How to develop software without them.
PPTX
Xp conf-tbd
PPTX
Agility Requires Safety
PDF
Continuous Delivery: The Dirty Details
PPTX
Novelty in Non-Greenfield
PDF
BDD & Behat
PPTX
Team Foundation Server - Source Control
apidays Paris 2022 - Agile API delivery with Feature Toggles, Rafik Ferroukh,...
Lean Kanban India 2015 | Branching for Continuous Delivery? Think Again! | De...
Trunk-based Development with Feature toggles
Is your code Toggled?!? By Devi Sridharan & Siddhartha Deshpande
Trank and branches for configuration management
Recipes for Continuous Delivery (ThoughtWorks Geeknight)
Web Speed And Scalability
Continuous feature-development
Feature driven development
Feature toggles share on Ruby Tuesday@Shanghai
devops certification
devops certification
Continously delivering
Branches are for Trees. How to develop software without them.
Xp conf-tbd
Agility Requires Safety
Continuous Delivery: The Dirty Details
Novelty in Non-Greenfield
BDD & Behat
Team Foundation Server - Source Control

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
“AI and Expert System Decision Support & Business Intelligence Systems”
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A Presentation on Artificial Intelligence
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation

Feature toggles

  • 4.  Pros  Code for new feature could not make to production  No fear to check-in in branch  Cons  Merge hell  Fear of refactoring  Difficult to share code across branches
  • 6.  Pros  Avoid big merges  Each check-in is production ready  Continuously Integrate thorough out the progress path of the feature  Cons  Incomplete feature may go to production  Fear to commit code
  • 7. Then how to do Continuous Integration? Feature Toggles
  • 9. It’s a simple if statement
  • 10. Feature toggle is a if statement that hides certain execution path
  • 11. Types of Feature toggle  Release toggles  Business toggles
  • 12. Release Toggles  To hide incomplete feature  Short lived  Removed as soon as feature is ready  Have pre-decided values across environments (except dev)
  • 13. Business Toggles  To enable A / B testing  Release feature to certain groups of people to get early feedback  Could be enabled or disabled on the fly
  • 14. Testing the Toggles  Unit Test  Test for both conditions i.e. toggle on and off  Integration Test  Test with toggle states that are going live  Test with toggle on  With business toggles be smart about what you want to test than try and test all combinations
  • 15. Tips and tricks to implement Feature Toggle
  • 16. In case of building new API end point that is not public facing No feature toggle needed
  • 17. In case of creating new model or table No feature toggle needed
  • 18. In case of adding a new column in database and exposing it through service No feature toggle needed May feature toggle validations or provide default value
  • 19. In case of new endpoint that is public facing Just feature toggle the url
  • 20. In case of UI component embedded in existing page Feature toggle the view element
  • 21. In case of logic change like change the way payment is processed Feature toggle by abstraction
  • 22. Things to keep in mind  Don’t try to toggle each and every line of code. Use only where its needed.  Keep the number of toggles under control  Try to create mutually exclusive toggles  Clean up release toggles and dead code
  • 23. Ways to implement toggles  Config file  Toggle manager for Admin to manage  Cookie store  … or whatever that makes sense
  • 24. They are riding on the same boat
  • 25. Feature Toggle is second best solution. The best solution is to find a way to gradually integrate, without Feature Branches or Feature Toggles. Martin Fowler
  • 26. No free lunch  Good test suite (unit and acceptance)  Fix or Revert the breaking change immediately  Break down features into smaller stories  Break down stories into smaller tech tasks  Think of how to take your code to production everyday than creating blockers
  • 27. References  http://martinfowler.com/bliki/FeatureToggle.html  http://www.infoq.com/presentations/Feature-Bits  http://blog.pluralsight.com/favor-feature-toggles- over-feature-branches  http://paulhammant.com/blog/branch_by_abstracti on.html  http://labs.spotify.com/2014/03/27/spotify- engineering-culture-part-1/