July 2025
Beginner to intermediate
402 pages
8h 8m
English
Design patterns are tools for solving common problems. So far, we have covered a few design patterns in this book, such as the Command and Adapter patterns. In this chapter, we will go over the Observer pattern and apply it to a common problem in embedded systems – handling temperature readings in different parts of the system.
We will start by looking at the Observer pattern and how it can be implemented at runtime. This pattern is particularly useful when multiple components need to react to changes in data from a central source. Imagine a temperature sensor in an embedded device that reports changes to multiple listeners. This could be part of a smart thermostat, an industrial machine ...
Read now
Unlock full access