All Articles

Pattern: Branch by Abstraction

Sam Newman (2019), Monolith to Microservices, O′Reilly.

Pattern: Branch by Abstraction

What happens if the functionality we want to extract is deeper inside our existing system ? Lets see what the branch by abstraction pattern offers.

  1. Create an abstraction for the functionality to be replaced
  2. Change clients of the existing functionality to use the new abstraction

Stage 1

  1. Create a new implementation of the abstraction with the reworked functionality
  2. Swith over the abstraction to use our new implementation
  3. Clean up the abstraction and remove the old implementation

Stage 2