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

Glossary · Automation software engineering and architecture

Factory pattern

Also known as: Factory method, Abstract factory

German: Fabrikmuster

In software engineering, the factory pattern is a creational design pattern in which objects are created through a dedicated factory function, method or object instead of being instantiated directly by the code that uses them, so the concrete type can be chosen at runtime or by configuration.

  • Software engineering

In one sentence

The factory pattern creates objects through a dedicated factory, so the concrete type can be chosen at runtime or by configuration.

Example

A driver factory reads the device type from the configuration file and returns the matching communication driver object for each connected device.

How it applies

  • Engineering: Factories centralize object creation and keep calling code independent of concrete classes. In automation software, they are used to create device handlers, drivers or recipe objects based on configuration. In PLC environments with static memory, factories often select among preallocated instances rather than creating new ones.
  • Maintenance: Adding a new device type means extending the factory and adding a class; code that uses the objects does not change.
  • Documentation: Document which types a factory can create and which configuration values select them. For service staff, this translates into a list of supported device types and the parameter values that identify them.

Factory pattern vs. dependency injection

With a factory, a component asks for an object when it needs one. With Dependency injection, objects are handed to the component from outside. Both decouple components from concrete types; frameworks for dependency injection often use factories internally.

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

Source: AI TechDoc Blog editorial definition, based on design pattern literature (Gamma et al., Design Patterns, 1994)

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!