Skip to main content
Tweeted twitter.com/StackSoftEng/status/962291659902996480
added 97 characters in body
Source Link
Ezoela Vacca
  • 911
  • 1
  • 7
  • 13

I am reading about SOLID principles and have just read that Dependency Inversion (DI, to be distinguished here from Dependency injection, which is one way of achieving the inversion) is an extension to the Open-Closed Principle (OCP). How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.

I am reading about SOLID principles and have just read that Dependency Inversion (DI) is an extension to the Open-Closed Principle (OCP). How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.

I am reading about SOLID principles and have just read that Dependency Inversion (DI, to be distinguished here from Dependency injection, which is one way of achieving the inversion) is an extension to the Open-Closed Principle (OCP). How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.

Spelled out the important abbreviations to avoid confusion
Source Link
Bart van Ingen Schenau
  • 76.7k
  • 20
  • 125
  • 189

I am reading about SOLID principles and have just read that DIDependency Inversion (DI) is an extension to OCPthe Open-Closed Principle (OCP). How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.

I am reading about SOLID principles and have just read that DI is an extension to OCP. How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.

I am reading about SOLID principles and have just read that Dependency Inversion (DI) is an extension to the Open-Closed Principle (OCP). How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.

Source Link
Ezoela Vacca
  • 911
  • 1
  • 7
  • 13

How Dependency inversion is an extension of OCP?

I am reading about SOLID principles and have just read that DI is an extension to OCP. How is that exactly meant, if OCP is about making class extensible without touching the original code, basically.