dependency inversion
Depend on an interface, not on a specific class.
The dependency inversion principle: high-level code depends on abstractions, and concrete details implement those abstractions.
Examples
OrderServiceasks for anIEmailSenderrather than creating anSmtpEmailSenderitself.
See also