IT lexicon Programming Dependency Injection

Dependency Injection DI

Programming På svenska → Updated: 2026-05-23

Instead of a class creating its dependencies itself it has them passed in from outside.

Makes code testable (mock dependencies in tests), loosely coupled, flexible. Big frameworks (Spring, Angular, ASP.NET) build their architectures around DI containers.

← Back to the lexicon