Glossary · Automation software engineering and architecture
Modular programming
Also known as: Modular design
German: Modulare Programmierung
In software engineering, modular programming is the practice of dividing a program into separate modules with well-defined interfaces, each responsible for one part of the functionality and changeable with limited effect on the others.
- Software engineering
In one sentence
Modular programming divides software into separate modules with defined interfaces, each responsible for one part of the functionality.
Example
The machine software is split into modules for infeed, pressing and outfeed, each with its own function blocks and a documented interface to the line sequence.
How it applies
- Engineering: Modules mirror the mechanical or functional structure of the machine, which makes code easier to reuse across machine variants and to test in isolation.
- Maintenance: With clear module boundaries, a change can be limited to one module and its impact assessed through the interface, which supports Impact analysis.
- Documentation: A modular software structure lets the documentation follow the same modules: one topic set per module, reused wherever the module is used. Module interfaces are good candidates for reference topics.
Modular programming vs. object-oriented programming
Modular programming is about dividing code into units with interfaces; it works in any language, including IEC 61131-3 languages. Object-oriented programming adds classes, inheritance and polymorphism as specific means to structure modules.