Select Page

Design Pattern

A method for reusing standardized software structures

In object-oriented software development, including software architecture, design, and object-oriented programming (OOP), a structured software development methodology, one repeatedly encounters similar tasks and design problems. The use of reusable design patterns (proven solution templates) prevents repetitive software programming effort. This method saves programming time and, moreover, avoids errors that could occur with redundant programming.

The most important aspects of design patterns

  • The degree of software reuse is increasing.
  • Documentation of existing and proven modular solutions
  • Reduction of system design and programming time
  • By adapting the design pattern, its application area can be tailored to the specific problem.
  • Improving software comprehensibility

A description of a design pattern should contain the following elements:

Design pattern name
Consisting of one or two words, it serves as a handler 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 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 about, 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 into design families, each forming a group for which this method is used in creating the software architecture and the object-oriented programming (OOP) can be used. Depending on the problem, the appropriate design pattern 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.

Design Patterns

Image 1: Design Patterns

You are looking for examples of the application of design patterns such as…

  • Adapter: Multithreading
  • Synchronization, protection, virtual and remote proxy
  • Smart pointer
  • timer
  • State machine
  • Custom memory management
  • Partition and Partition Manager
  • Flexible storage management using different managers
  • Dynamically changeable memory allocation strategy
  • Design Pattern Strategy
  • Algorithms with a defined basic structure
  • Behavioral patterns in C and C++
  • Porting behavior patterns from C to C++
  • Storage space and runtime measurements
  • Design patterns as a means of increasing performance
  • Using patterns for debugging purposes…?


Then you've come to the right place at MicroConsult. We offer you the opportunity to work in a Workshop for Design Patterns to learn about the design patterns mentioned above, their structure, and their correct application.

Practical examples and numerous exercises will introduce you to this topic:

Workshop: Design Patterns (not only) for Embedded Systems

This workshop will show you the conditions under which classic design patterns can be used profitably even in resource-limited embedded systems.

In our training „Design Patterns with Python“Learn how to apply the most important design patterns. This includes, in particular, the special characteristics of the object-oriented programming language Python.”. 

MicroConsult also supports you with further training and coaching on the topic of design patterns, e.g. on the following topics:

Software architectures for embedded systems and real-time systems

OOP Basics: A Language-Independent Introduction to Object-Oriented Programming

UML basics and introduction to model-based software development

UML Practical Workshop: Practical Application of Model-Based Software Development for Embedded and Real-Time Systems

Design patterns (not only) for embedded systems

Design Patterns with Python 

Embedded software design and patterns with C

Training & coaching on the other topics in our portfolio can be found here. here.

Send us your questions, requests and requirements! Contact form

Author:
Dipl.-Ing. (FH) Thomas Batt Thomas Batt is a native of Freiburg. After training as a radio and television technician, he studied communications engineering at the University of Applied Sciences in Offenburg. He worked in development in the fields of power electronics, medical electronics, and CompactPCI/VME bus CPU and peripheral boards. Today, at MicroConsult GmbH, he is responsible for software engineering for embedded/real-time systems and development process consulting as a trainer and coach.

MicroConsult Newsletter

With the MicroConsult newsletter, you'll stay on the pulse of the embedded world. Look forward to proven practical knowledge, real professional tips, and current events – directly from our experts for your project success.

Subscribe now!

Published by

weissblau media

weissblau media