The most important elements for design patterns that allow you to easily reuse standardized software structures.
In object-oriented software architecture and design, as well as in object-oriented programming (OOP) as a structured software development methodology, similar tasks and problems repeatedly arise. The use of reusable design patterns (proven solution templates) can prevent repetitive software programming efforts.
This method saves development time and avoids errors that could occur with duplicate programming.
The most important aspects for the use of design patterns
- Higher degree of software reuse
- Documentation of existing and proven modular solutions
- Reduction of software design and programming time
- By adapting the design patterns, their application area can be tailored to the specific problem.
- Improving software comprehensibility
The description of a design pattern should contain the following elements:
Design pattern name
consisting of one or two terms that serve as handlers for describing the problem.
Description of the design problem and its context
Does it contain information about when and where this Design patterns It should be used (intention/motivation/application of the design pattern). It explains the problem statement and its context, such as the description of the design problem and a list of conditions that must be met for meaningful application.
Solution description of the design pattern
It contains a list of the elements (e.g., classes and objects) and how they can be arranged, the design, the relationships to other elements, the responsibilities (e.g., in an architectural design), and the collaboration. This description should represent a generally applicable approach to the design pattern.
Description and evaluation of the results (consequence(s)) of applying the design pattern
This serves to evaluate the costs and benefits of this pattern. It provides information on, for example, the memory and time requirements and can be used to estimate resource utilization in terms of CPU time versus memory usage.
Design patterns can be grouped together, and this method can be used to create software architecture and implement object-oriented programming (OOP). Depending on the problem at hand, the appropriate software design can be selected from the appropriate design family.
Typical design families
Generating pattern (Creational Design Pattern)
deals with object creation.
Structural pattern (Structural Design Pattern)
describes the composition of classes and objects.
Behavioral patterns (Behavioral Design Pattern)
describes the interactive communication between objects, the generic/individual behavior of an object, and the distribution of responsibilities.
The scope of the design pattern defines its application:
- classes or
- objects
- module
Target platform of design patterns
Design patterns can be applied across various platforms:
- PC-based systems
- Embedded systems
In embedded systems (e.g., process control software that is executed in microcontrollers with real-time requirements), an important aspect when using design patterns is resource consumption in the form of CPU processing time and the required memory (program and data memory).
List of design patterns
Production patterns
- Factory Method Design Pattern
- Abstract Factory Design Pattern
- Prototype Design Pattern
- Singleton Design Pattern
Structural patterns
- Adapter Design Pattern
- Decorator Design Pattern
- Proxy Design Pattern
Behavioral patterns
- Observer Design Pattern
- Command Design Pattern
- State/Event Design Pattern
- Template Method Design Pattern
More patterns
- Facade Design Pattern
- Composite Design Pattern
- Memento Design Pattern
- Chain of Responsibility Design Pattern
- Flyweight Design Pattern
- Iterator Design Pattern
- Mediator Design Pattern
Many UML (Unified Modeling Language) tools already provide a selection of well-known patterns that can be used directly in the software or software model.

Image 1: Design Patterns
Conclusion
The use of reusable design patterns can lead to the creation of a custom pattern catalog to avoid typical misinterpretations.
Advantage: The topic of design patterns is automatically established within the team during the catalog creation process and can thus fully exploit its advantages.
In the MicroConsult seminar on design patterns Learn to assess under which conditions you can profitably use classic design patterns even in resource-limited embedded systems.
The seminar This course familiarizes you with the patterns that are particularly well-suited for typical embedded system applications. You will be able to assess their memory and runtime costs and verify them through runtime measurements. Furthermore, you will learn which commonly used approaches should be avoided ("anti-patterns"), discover how design patterns can be used for debugging, and apply these techniques.
Further information
Article: How to correctly apply design patterns in practice
MicroConsult Training: Design Patterns (not only) for Embedded Systems
MicroConsult Training & Coaching on the topic of software quality
MicroConsult expertise on the topic of software quality

