Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Dependency injection

Also known as: DI

German: Abhängigkeitsinjektion

In software engineering, dependency injection is a design technique in which a component receives the objects or services it depends on from outside, for example through constructor parameters, properties or method arguments, instead of creating or locating them itself.

  • Software engineering

In one sentence

Dependency injection supplies a component's dependencies from outside instead of letting the component create them itself.

Example

A conveyor function block receives an interface reference to its drive at initialization, so tests can pass a simulated drive and the machine passes the real one.

How it applies

  • Engineering: Dependency injection decouples a component from concrete implementations of what it uses. In object-oriented IEC 61131-3 code, a function block can receive interface references to devices or services; in C#, Java or C++ applications, frameworks can manage the wiring.
  • Testing: Injected dependencies can be replaced with mocks or simulations, which makes Component test runs possible without hardware.
  • Documentation: Document which dependencies a component expects, through which interface and when they must be supplied. Configuration of the wiring, such as which drive is connected to which conveyor, belongs in commissioning and service documentation if it can be changed in the field.

Dependency injection vs. inversion of control

Inversion of control is the general principle that a framework or caller controls the flow and provides what a component needs. Dependency injection is one specific way to apply it to dependencies. Overused, dependency injection can make it hard to see which implementation actually runs, which complicates troubleshooting.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Blog editorial definition, based on object-oriented design practice (Fowler, 2004)

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Blog and are not part of any standard.

Seen a mistake? Send us a note!