<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abiel Tiezazu  berhe</title>
    <description>The latest articles on DEV Community by Abiel Tiezazu  berhe (@abiel_tiezazu).</description>
    <link>https://dev.to/abiel_tiezazu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3658835%2Fefa02eaa-1490-48b1-ac97-71d5154cdfe3.png</url>
      <title>DEV Community: Abiel Tiezazu  berhe</title>
      <link>https://dev.to/abiel_tiezazu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abiel_tiezazu"/>
    <language>en</language>
    <item>
      <title>Why Design Patterns?</title>
      <dc:creator>Abiel Tiezazu  berhe</dc:creator>
      <pubDate>Fri, 12 Dec 2025 15:47:29 +0000</pubDate>
      <link>https://dev.to/abiel_tiezazu/why-design-patterns-cf3</link>
      <guid>https://dev.to/abiel_tiezazu/why-design-patterns-cf3</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;gt; Why Design Patterns?
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
**Design Patterns have become an object of some controversy in the programming world in recent times, largely due to their perceived ‘over-use’ leading to code that can be harder to understand and manage.&lt;/p&gt;

&lt;p&gt;It’s important to understand that Design Patterns were never meant to be hacked together shortcuts to be applied in a haphazard, ‘one-size-fits-all’ manner to your code. There is ultimately no substitute for genuine problem solving ability in software engineering.&lt;/p&gt;

&lt;p&gt;The fact remains, however, that Design Patterns can be incredibly useful if used in the right situations and for the right reasons. When used strategically, they can make a programmer significantly more efficient by allowing them to avoid reinventing the proverbial wheel, instead using methods refined by others already. They also provide a useful common language to conceptualize repeated problems and solutions when discussing with others or managing code in larger teams.&lt;/p&gt;

&lt;p&gt;That being said, an important caveat is to ensure that the how and the why behind each pattern is also understood by the developer.&lt;/p&gt;

&lt;p&gt;Without further ado (in general order of importance, from most to least):&lt;/p&gt;

&lt;p&gt;The Most Important Design Patterns&lt;br&gt;
Singleton&lt;br&gt;
The singleton pattern is used to limit creation of a class to only one object. This is beneficial when one (and only one) object is needed to coordinate actions across the system. There are several examples of where only a single instance of a class should exist, including caches, thread pools, and registries.&lt;/p&gt;

&lt;p&gt;It’s trivial to initiate an object of a class — but how do we ensure that only one object ever gets created? The answer is to make the constructor ‘private’ to the class we intend to define as a singleton. That way, only the members of the class can access the private constructor and no one else.&lt;/p&gt;

&lt;p&gt;Important consideration: It’s possible to subclass a singleton by making the constructor protected instead of private. This might be suitable under some circumstances. One approach taken in these scenarios is to create a register of singletons of the subclasses and the getInstance method can take in a parameter or use an environment variable to return the desired singleton. The registry then maintains a mapping of string names to singleton objects, which can be accessed as needed.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>design</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
