개발고급

의존성 주입

English: dependency injection

이렇게 발음해요: dih-PEN-dun-see in-JEK-shun (dependency injection)

정의

클래스가 필요한 객체를 안에서 만들지 않고 밖에서 넘겨주는 것.

의존성 주입 덕분에 테스트에서 메일러를 바꿔 끼울 수 있어요.
Dependency injection lets us swap the mailer in tests.

다른 표현: DI

플래시카드로 배우기 이 카테고리의 모든 단어

다른 언어로

피드백