The Principle of Reuse

Why reinvent the wheel again and again?

For many years we are working for our customers in the field of embedded software development. In our daily practice, we realized that many of our customers - or we on behalf of our customers - often develop similar functionality over and over again. This fact is an incredible opportunity for each software development department, because the wheel does not need to be reinvented again and again. Through the use of modern software development methods and the right tools, the principle of software reuse, which is well established in many other software development areas can also be applied for embedded software. Or would you, if you developed a GUI application, first start to implement code to paint buttons, edit fields and dialogs on the screen?

No - you rely on exisiting software components to do that for you, so you can concentrate on the actual application functionality.

So why not applying the principle of software reuse with flexibly deployable components to the embedded software development? After all, this approach can save time and costs on an enormous scale and at the same time it can increase the software quality significantly.

How does it work?

With a clean embedded software architecture, the functionality can be distributed among individual software components in order to create small self-contained functional units that are separated by clean interfaces from other software components. Thus, the so created software modules have no direct dependencies to other modules and are therefore portable and flexible. The assembling of the individual components, so they can be used in various contexts, is done during the initialization of the application.

With a collection of such reusable building blocks, you can keep a firm grip on your product variants, because major parts of the code are made of reusable software modules. The variants are formed by linking the appropriate modules with some glue logic. The reusable software components' code exists only once, together with corresponding unit tests. This is the crucial advantage over the commonly practiced approach to code reuse by copy-paste-modify: Use thoroughly tested components with clean interfaces in multiple applications. This means that all variants automatically benefit from improvements / bugfixes.

With a little luck, a considerable part of the requirements can even be covered by a generic embedded software construction kit like the redBlocks Toolkit for Rapid Embedded Software Development. Then, you save substantial development time and costs that would have to be devoted to meet common embedded software requirements. You can thus better focus on the features of your application that distinguish your products from those of your competitors.

Does this work for Deeply Embedded Applications as well?

Yes, it does! Even for the smallest 8-bit microcontrollers with very limited resources, very powerful C++ compilers are available that perfectly support this architectural approach.

With the C++ programming language, reusable software components can be developed efficiently like with no other programming language, when it comes to scalability according to the system resources. Thus, the developer can e. g. deliberately choose whether he wants to declare methods as virtual and buy this flexibility with additional memory footprint and a little runtime overhead. Alternatively, by using C++ templates properly, it is possible to implemented reusable software components without any overhead compared to the implementation of the same functionality in C.

As part of our training courses, this architectural approach, that is rougly outlined here, is explained in full detail. You will be amazed how significantly this approach can increase the productivity of your software development.