Skip to content

Glossary: Software Design Patterns in C++

Dependency inversion principle

Also written: DIP

The D in SOLID: high-level code shouldn't depend on low-level details, and both should depend on an interface. You pass the detail in, as `confirm_order` receives a `Notifier`.

Where the book teaches it

Related terms

SOLIDInterfaceDependency injection