|
The predominate language for the development of embedded systems is clearly C. Other
languages certainly have their allure, but over 80% of all embedded systems are developed
in this classic language. Many of the advances in the industry assume the use of object-oriented
languages, web clients, and technologies that are either unavailable in the bare-metal development
environment of embedded systems, or are too memory or resource intensive to be
effectively deployed.
Design patterns are one of these profitable areas of advancement. A design pattern is a
generalized solution to a recurring problem. Design patterns allow several advantages. First,
they allow users to reason about solutions in a more abstract way and to codify their important
properties. Since all design patterns are about optimization of some set of design criteria at the
expense of others, different design patterns might address the same operational context but
provide different benefits and costs. By reifying design patterns as a basic concept, we can
reason about the best ways to optimize our systems and the technologies and approaches to
accomplish that.
Secondly, design patterns allow us to reuse solutions that have proven themselves to be
effective in other, similar circumstances. This is certainly a larger scope of reuse than reusing
lines of code or individual functions. Because design patterns can be analyzed for their
performance and optimization properties, we can select the best patterns for our particular
problems.
Additionally, design patterns give us a larger set of reusable building blocks with which to
describe our system. If you say the system uses a “symmetric deployment pattern with RMS
multitasking scheduling and a triple modular redundancy approach” that sums up a significant
portion of the architectural optimization decisions about your system. Design patterns make our
vocabulary larger and more expressive.
Lastly, design patterns provide a unit of reference. If you Google “design patterns” you get
over 3,000,000 hits. If you search the Amazon book department online, you get a list of 793
books. There is a great deal of work that goes on in the area of defining and using design
patterns, so we are exposed to an enormous wealth of reusable and proven solutions from which
we can select, mix, and bring to bear appropriate solutions. |