Solutions

 View Only

Pattern: Branch and Merge

By Michael Jastram posted 03-07-2019 06:16

  

Intent

Avoid copy and paste.

Also Known as

  • Reuse
  • Synchronization

Motivation

Copy and Paste is very easy, but in the long run, we regret it. Branching (and optionally merging) is an alternative that allows you to drastically reduce rework, thereby saving time and improving quality.

Branching and merging has been state of the art in software development for 20 years, and it's time that we apply it to product development as well.

Applicability

Use the pattern:

  • When you have standard content that you want to use in multiple places, and you want to periodically update it in all places
  • You want to allow teams to work independently, but you need to bring the work together at some point
  • You have a family of similar products, and you want to apply improvements to all on a regular basis

Structure

Key to Branching and merging is to keep track of the source of content. For this to be practical, you need a proper data model. This allows branching and merging on a per-item basis. Consider the following figure: The main branch (white) is branched into Master and Feature branch that can evolve independently. At some point, they can be merged, incorporating changes from both branches.

Consequences

The pattern has the following benefits and liabilities:

  • Benefits:
    • Possibility to work independently on different parts of the system
    • Compared to copy and paste, merging is straightforward and fast.
    • Drastically improves quality (consistent information everywhere) and speed (only changes need to be retested in new branches)
  • Liabilities:
    • Without proper process, this can get really messy and benefits vaporize
    • In some scenarios, branching and merging can be overkill. Don't overuse it.

Implementation

Branching and Merging requires proper tool support, and on the right level of granularity. For instance, you can use MS Word for branching and merging on the document level, but it quickly becomes cumbersome with the size of the document.
Jama Connect provides reuse capabilities that are powerful enough for dozens to hundreds of branches.
Beyond that, and with additional needs like parametrization, you can use a dedicated tool like Pure Variants.

Related Patterns

Branching Image source: Jens Lechtenbörger, published under the Creative Commons license CC BY-SA 4.0.

0 comments
65 views