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

Glossary · Automation software engineering and architecture

Encapsulation

Also known as: Information hiding

German: Kapselung

In software engineering, encapsulation is the principle of bundling data with the operations that act on it and restricting direct access to that data from outside, so other parts of the program can only interact with a module or object through its defined interface.

  • Software engineering

In one sentence

Encapsulation bundles data with its operations and restricts outside access, so others use a module only through its interface.

Example

The internal step counter of a function block is declared private; other code reads the block's state only through its 'State' output, so the internals can change freely.

How it applies

  • Engineering: Encapsulation protects a module's internal state from unintended changes. In IEC 61131-3, function block instance data and access specifiers in object-oriented extensions support it; global variables undermine it.
  • Maintenance: Encapsulated modules can be refactored internally without affecting callers, which reduces Change propagation. Breaking encapsulation for a quick fix, for example by writing to another block's internal variable from the HMI, creates hidden dependencies.
  • Documentation: Document only the public interface for library users and keep internal details in developer documentation. If users need internal values for diagnostics, provide them through an explicit diagnostic interface rather than by exposing internals.

Encapsulation vs. abstraction

Abstraction decides what a module shows to its users; encapsulation enforces that users cannot reach past it. Encapsulation without good abstraction produces a well-protected but awkward interface; abstraction without encapsulation produces an interface that callers can bypass.

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

Source: AI TechDoc Blog editorial definition, based on software design literature (Parnas, 1972)

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!