From 35bdbe521f83668f0520128110877491d5f86614 Mon Sep 17 00:00:00 2001 From: Oleg Kleshchunov Date: Fri, 15 Nov 2019 10:37:38 +0200 Subject: [PATCH] Update 5.dip.py --- 5.dip.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/5.dip.py b/5.dip.py index fb3182e..373988a 100644 --- a/5.dip.py +++ b/5.dip.py @@ -10,6 +10,16 @@ composed of modules. When this happens, we have to clear things up by using dependency injection. High-level components depending on low-level components to function. + + +In programming, the dependency inversion principle is a way to decouple software modules. + +This principle states that: + High-level modules should not depend on low-level modules. Both should depend on abstractions. + Abstractions should not depend on details. Details should depend on abstractions. + +To comply with this principle, we need to use a design pattern known as a dependency inversion pattern, +most often solved by using dependency injection. """ class XMLHttpService(XMLHttpRequestService):