Respect the rules

Before deciding to adopt the branch design pattern, understand the pattern operation perfectly. This is one of the most complex patterns we will see in this book and having a complete understanding of the pattern is fundamental.

I am referring to the implementation rules of the pattern. Creating something hybrid or not fully conforming to the pattern implies a loss of performance, the extreme difficulty of maintenance, being difficult to test, and a host of other factors that can be traumatic.

If you come to the conclusion that some pattern rule should be broken because of the domain business, stop and think. There are two possibilities: the domain is poorly defined, or the pattern does not apply to your business.

Get Microservice Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.