<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dependency Inversion Principle on Artur Rios Lab</title><link>https://lab.artur-rios.tech/tags/dependency-inversion-principle/</link><description>Recent content in Dependency Inversion Principle on Artur Rios Lab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2026 00:05:00 +0000</lastBuildDate><atom:link href="https://lab.artur-rios.tech/tags/dependency-inversion-principle/index.xml" rel="self" type="application/rss+xml"/><item><title>What Is the Dependency Inversion Principle? Policy, Detail and Who Owns the Interface</title><link>https://lab.artur-rios.tech/concepts/dependency-inversion-principle/</link><pubDate>Wed, 21 Oct 2026 00:05:00 +0000</pubDate><guid>https://lab.artur-rios.tech/concepts/dependency-inversion-principle/</guid><description>&lt;p&gt;A checkout that takes a payment has to call the payment provider: there is no&#10;way around that at run time. It does not follow that the checkout&amp;rsquo;s source code&#10;has to &lt;em&gt;name&lt;/em&gt; the provider, import its SDK, or change when the provider changes&#10;its API. The &lt;strong&gt;dependency inversion principle&lt;/strong&gt; is the rule that separates those&#10;two things. It asks which way the arrows between modules should point, and its&#10;answer is that the code holding the important decisions should not depend on the&#10;code holding the details; the details should depend on it. This is part five of&#10;a series on SOLID, after the &lt;a href="../single-responsibility-principle/"&gt;single responsibility&lt;/a&gt;,&#10;&lt;a href="../open-closed-principle/"&gt;open-closed&lt;/a&gt;, &lt;a href="../liskov-substitution-principle/"&gt;Liskov substitution&lt;/a&gt;&#10;and &lt;a href="../interface-segregation-principle/"&gt;interface segregation&lt;/a&gt; principles, and&#10;it leads into &lt;a href="../inversion-of-control/"&gt;inversion of control&lt;/a&gt;, the mechanism&#10;most programs use to put the principle into practice. This article explains what&#10;the principle says, where it came from, why the flow of control and the&#10;direction of a dependency can point opposite ways, why the abstraction has to&#10;belong to the code that uses it, and what is not worth inverting. Every output&#10;shown here was produced by running the code on Windows 11, with Python 3.14.6,&#10;not written by hand.&lt;/p&gt;</description></item></channel></rss>