<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Patterns on Yunier&#39;s Wiki</title>
    <link>http://localhost:1313/tags/patterns/</link>
    <description>Recent content in Patterns on Yunier&#39;s Wiki</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Dec 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://localhost:1313/tags/patterns/rss" rel="self" type="application/rss+xml" />
    <item>
      <title>Power Up The Strategy Pattern With Inversion Of Control</title>
      <link>http://localhost:1313/post/2022/power-up-the-strategy-pattern-with-inversion-of-control/</link>
      <pubDate>Sun, 04 Dec 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/post/2022/power-up-the-strategy-pattern-with-inversion-of-control/</guid>
      <description>&lt;p&gt;If you are a fan of the &lt;a href=&#34;https://refactoring.guru/design-patterns/strategy&#34;&gt;strategy pattern&lt;/a&gt;, and you find yourself adding a lot of conditional logic around each strategy then you should consider replacing all branching logic using inversion of control.&lt;/p&gt;&#xA;&lt;p&gt;Take the following code as an example. It defines a strategy for reading different file types. For simplicity, the code writes out to the console a message, in a real-world application, the logic would be far more complex, but we are not interested in that logic, rather we are interested in how the strategy pattern works and how we can improve its usage.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
