liveBook · Manning

Pattern

As explained in Microservices Patterns, Second Edition

A pattern is a reusable solution to a recurring design or architectural problem in a particular context.

A pattern is a reusable solution to a problem in a particular context. In software, it solves an architectural or design problem by defining collaborating software elements. section 7.6.1

Patterns support deliberative design by offering candidate solutions and helping clarify the context and criteria used to evaluate them. This is especially useful when designing a complicated architecture such as microservices. section 7.6

Banking overdraft policies

An account that supports different overdraft limits and fees can use the Strategy pattern: an Overdraft interface encapsulates the algorithm, concrete strategies define particular policies, and Account uses the algorithm. section 7.6.1

Figure 7.11 The visual representation of different types of relationships between the patterns: a successor pattern solves a problem created by applying the predecessor pattern; two or more patterns can be alternative solutions to the same problem; one pattern can be a specialization of another pattern; and patterns that solve problems in the same area can be grouped, or generalized.
PatternRelationships

Explore how patterns can relate as alternatives, successors, specializations, or members of a generalized group. section 7.6.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines reusable solutions and collaborating software elements, then illustrates the idea with a Strategy example.
Examples
Uses a banking account with varying overdraft policies to illustrate the Strategy pattern's interface, concrete strategies, and account.
What you can do after
Evaluate architectural choices by using patterns as candidate solutions and clarifying context and criteria.
How it connects
Connects patterns to pattern languages, deliberative design, software architecture and design, and the Strategy pattern.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.