D is for the Dependency Inversion Principle


The "D" in SOLID stands for Dependency Inversion Principle. Again, another mouthful but pretty straight forward.

Inversion, not injection, is defined as:
Depend on abstractions, not on concretions.

i.e. Depend on interfaces instead of concrete classes.

Note: Dependency Injection is a way of putting this into practise, similar but not the same thing.

Popular posts from this blog

I is for the Interface Segregation Principle

S is for the Single Responsibility Principle

L is for the Liskov Substitution Principle