Software Architecture

Dependency Injection

/dɪˈpendənsi ɪnˈdʒekʃən/

Definition

A design pattern where dependencies are passed in from outside rather than created internally — improves testability and flexibility.

Example in context

"The service receives the database connection via DI — in tests we inject a mock, in production we inject the real one."

Practice this term

Master Dependency Injection in context by working through exercises in the Software Architecture module. You'll see the term used in real engineering scenarios with multiple-choice, fill-in-the-blank, and matching drills.