Professional Documents
Culture Documents
Chris Birchall
2013/06/21
#m3_dev
Branching strategies
Feature Branches
vs
Branch By Abstraction
Feature Branches
master branch is used for rollouts
Little work done directly on master
For every feature/bugfix, cut a branch
To rollout a feature, merge to master
feature A
master
feature B
feature A
!
M
O
BO
master
feature B
Me
class
FooService
interface
FooService
class
DefaultFooService
class
CachingFooService
Other dev
class
FooService
!
M
O
BO
Merging is SCARY
Merging is SCARY
Merging is A CHANGE
to the codebase
A solution?
Branch by Abstraction
Branch by Abstraction
The name is misleading...
Branch by Abstraction
All dev is done on master
Incomplete work is disabled using feature flags
master is always stable, ready for rollout
Changes performed by introducing abstraction
interface
LoginService
class
LegacyLoginServic
e
class
LegacyLoginServic
e
interface
LoginService
class
LegacyLoginServic
e
class
NewLoginService
class
LegacyLoginServic
e
class
NewLoginService
interface
LoginService
class
DefaultLoginServic
e
Good devs!
Thank you!
Further reading:
http://paulhammant.com/blog/branch_by_abstraction.html/