Skip to content

Glossary: Software Design Patterns

Dependency injection

Also written: DI, injection

Giving code its dependencies instead of letting it create or find them. That way a test can pass in fakes and avoid disk, real email and the real clock.

Where the book teaches it

Related terms

Constructor injectionDIPComposition rootService locator