liveBook · Manning

Software pattern

As explained in Microservices Patterns, Second Edition

A software pattern is a reusable solution to a software architecture or design problem defined in terms of collaborating software elements.

A software pattern solves an architecture or design problem by defining collaborating software elements. Its solution applies within a particular context and may not suit other contexts. section 7.6.1

Bank overdraft policies

For a banking application with different overdraft limits and fees, the Strategy pattern separates the overdraft algorithm into an interface and concrete strategies; an 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

Use the diagram to distinguish successor, alternative, specialization, and generalization relationships between patterns. section 7.6.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines patterns through collaborating elements and illustrates class responsibilities, then points to higher-level patterns involving services.
Examples
Uses a banking application’s overdraft policies to illustrate the Strategy pattern’s interface, concrete strategies, and Account class.
What you can do after
Evaluate whether a reusable solution fits a particular application context.
How it connects
Connects software patterns to pattern languages, software architecture, software design, and object-oriented design patterns.

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.