Development Methods & Design

Dependency Injection

English

Overview

A design pattern where an object's dependencies are supplied from the outside rather than created internally.

Details

A design pattern where dependent objects are injected from outside (such as via constructor arguments) rather than created inside a class. It makes swapping in mocks for testing easier and results in loosely coupled designs.

More Programming terms