<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>OOP &amp;mdash;   christova  </title>
    <link>https://christova.writeas.com/tag:OOP</link>
    <description>&lt;b&gt;&lt;h3&gt;Tech Articles&lt;/h3&gt;&lt;/b&gt;&lt;br/&gt;&lt;b&gt;Collated from various sources. Full copyright remains with original authors.&lt;/b&gt;</description>
    <pubDate>Fri, 29 May 2026 20:10:52 +0000</pubDate>
    <item>
      <title>SOLID Principles</title>
      <link>https://christova.writeas.com/solid-principles-8m2j?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;#SOLID #solidprinciples #objectoriented #oop&#xA;&#xA;𝐒 - 𝐒𝐢𝐧𝐠𝐥𝐞 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐢𝐛𝐢𝐥𝐢𝐭𝐲 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞&#xA;A class should have only one reason to change.&#xA;\- Example: Instead of one giant User class that handles authentication, profile updates, and sending emails, split it into UserAuth, UserProfile, and EmailService.&#xA;&#xA;𝐎 - 𝐎𝐩𝐞𝐧/𝐂𝐥𝐨𝐬𝐞𝐝 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞&#xA;Classes should be open for extension but closed for modification.&#xA;\- Example: Define a Shape interface with an area() method. When you need a new shape, just add a Circle or Triangle class that implements it.&#xA;&#xA;𝐋 - 𝐋𝐢𝐬𝐤𝐨𝐯 𝐒𝐮𝐛𝐬𝐭𝐢𝐭𝐮𝐭𝐢𝐨𝐧 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞&#xA;Subtypes must be substitutable for their base types without breaking behavior.&#xA;\- Example: If Bird has a fly() method, then Eagle and Sparrow should both work anywhere a Bird is expected.&#xA;&#xA;𝐈 - 𝐈𝐧𝐭𝐞𝐫𝐟𝐚𝐜𝐞 𝐒𝐞𝐠𝐫𝐞𝐠𝐚𝐭𝐢𝐨𝐧 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞&#xA;Don&#39;t force classes to implement interfaces they don&#39;t use.&#xA;\- Example: Instead of one fat Machine interface with print(), scan(), and fax(), break it into Printable, Scannable, and Faxable. A SimplePrinter only implements Printable.&#xA;&#xA;𝐃 - 𝐃𝐞𝐩𝐞𝐧𝐝𝐞𝐧𝐜𝐲 𝐈𝐧𝐯𝐞𝐫𝐬𝐢𝐨𝐧 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞&#xA;High-level modules should not depend on low-level modules. Both should depend on abstractions.&#xA;\- Example: Your OrderService should depend on a PaymentGateway interface, not directly on Stripe or PayPal.&#xA;&#xA;The real power of SOLID is not in following each principle in isolation. It&#39;s in how they work together to make your code easier to change, test, and extend.]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/u222BBWV.jpg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:SOLID" class="hashtag"><span>#</span><span class="p-category">SOLID</span></a> <a href="https://christova.writeas.com/tag:solidprinciples" class="hashtag"><span>#</span><span class="p-category">solidprinciples</span></a> <a href="https://christova.writeas.com/tag:objectoriented" class="hashtag"><span>#</span><span class="p-category">objectoriented</span></a> <a href="https://christova.writeas.com/tag:oop" class="hashtag"><span>#</span><span class="p-category">oop</span></a></p>

<p>𝐒 – 𝐒𝐢𝐧𝐠𝐥𝐞 𝐑𝐞𝐬𝐩𝐨𝐧𝐬𝐢𝐛𝐢𝐥𝐢𝐭𝐲 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞
A class should have only one reason to change.
- Example: Instead of one giant User class that handles authentication, profile updates, and sending emails, split it into UserAuth, UserProfile, and EmailService.</p>

<p>𝐎 – 𝐎𝐩𝐞𝐧/𝐂𝐥𝐨𝐬𝐞𝐝 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞
Classes should be open for extension but closed for modification.
- Example: Define a Shape interface with an area() method. When you need a new shape, just add a Circle or Triangle class that implements it.</p>

<p>𝐋 – 𝐋𝐢𝐬𝐤𝐨𝐯 𝐒𝐮𝐛𝐬𝐭𝐢𝐭𝐮𝐭𝐢𝐨𝐧 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞
Subtypes must be substitutable for their base types without breaking behavior.
- Example: If Bird has a fly() method, then Eagle and Sparrow should both work anywhere a Bird is expected.</p>

<p>𝐈 – 𝐈𝐧𝐭𝐞𝐫𝐟𝐚𝐜𝐞 𝐒𝐞𝐠𝐫𝐞𝐠𝐚𝐭𝐢𝐨𝐧 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞
Don&#39;t force classes to implement interfaces they don&#39;t use.
- Example: Instead of one fat Machine interface with print(), scan(), and fax(), break it into Printable, Scannable, and Faxable. A SimplePrinter only implements Printable.</p>

<p>𝐃 – 𝐃𝐞𝐩𝐞𝐧𝐝𝐞𝐧𝐜𝐲 𝐈𝐧𝐯𝐞𝐫𝐬𝐢𝐨𝐧 𝐏𝐫𝐢𝐧𝐜𝐢𝐩𝐥𝐞
High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Example: Your OrderService should depend on a PaymentGateway interface, not directly on Stripe or PayPal.</p>

<p>The real power of SOLID is not in following each principle in isolation. It&#39;s in how they work together to make your code easier to change, test, and extend.</p>
]]></content:encoded>
      <guid>https://christova.writeas.com/solid-principles-8m2j</guid>
      <pubDate>Sun, 17 May 2026 13:34:17 +0000</pubDate>
    </item>
    <item>
      <title>OOP Principles</title>
      <link>https://christova.writeas.com/oop-principles?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;#oop #objectorientedprinciples&#xA;&#xA;Basic OOP Concepts Explained with Clear Examples:&#xA;&#xA;1\. 𝐄𝐧𝐜𝐚𝐩𝐬𝐮𝐥𝐚𝐭𝐢𝐨𝐧&#xA;Hide internal data behind public methods. &#xA;\- Example: A BankAccount class keeps balance and pin private. The only way to interact with it is through deposit() and getBalance().&#xA;&#xA;2\. 𝐀𝐛𝐬𝐭𝐫𝐚𝐜𝐭𝐢𝐨𝐧&#xA;Expose a simple interface, hide the complexity behind it.&#xA;\- Example: An EmailService class gives you sendEmail(to, body). Internally, it handles SMTP connections, authentication, and retry logic. The caller doesn&#39;t need to know any of that. They just call one method and it works.&#xA;&#xA;3\. 𝐈𝐧𝐡𝐞𝐫𝐢𝐭𝐚𝐧𝐜𝐞&#xA;Let child classes reuse and override behavior from a parent class.&#xA;\- Example: An Animal class defines speak(). Dog extends it and returns &#34;Woof!&#34;, Cat extends it and returns &#34;Meow!&#34;. Shared logic lives in one place, and each subclass customizes what it needs.&#xA;&#xA;4\. 𝐏𝐨𝐥𝐲𝐦𝐨𝐫𝐩𝐡𝐢𝐬𝐦&#xA;Write code that works with multiple types through a common interface. &#xA;\- Example: Define a Shape interface with a draw() method. Now Circle, Rectangle, and Triangle each implement draw() their own way. A single drawShape(Shape s) method works with all of them.]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/KINR05Yh.jpg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:oop" class="hashtag"><span>#</span><span class="p-category">oop</span></a> <a href="https://christova.writeas.com/tag:objectorientedprinciples" class="hashtag"><span>#</span><span class="p-category">objectorientedprinciples</span></a></p>

<p><strong>Basic OOP Concepts Explained with Clear Examples:</strong></p>

<p>1. 𝐄𝐧𝐜𝐚𝐩𝐬𝐮𝐥𝐚𝐭𝐢𝐨𝐧
Hide internal data behind public methods.
- Example: A BankAccount class keeps balance and pin private. The only way to interact with it is through deposit() and getBalance().</p>

<p>2. 𝐀𝐛𝐬𝐭𝐫𝐚𝐜𝐭𝐢𝐨𝐧
Expose a simple interface, hide the complexity behind it.
- Example: An EmailService class gives you sendEmail(to, body). Internally, it handles SMTP connections, authentication, and retry logic. The caller doesn&#39;t need to know any of that. They just call one method and it works.</p>

<p>3. 𝐈𝐧𝐡𝐞𝐫𝐢𝐭𝐚𝐧𝐜𝐞
Let child classes reuse and override behavior from a parent class.
- Example: An Animal class defines speak(). Dog extends it and returns “Woof!”, Cat extends it and returns “Meow!”. Shared logic lives in one place, and each subclass customizes what it needs.</p>

<p>4. 𝐏𝐨𝐥𝐲𝐦𝐨𝐫𝐩𝐡𝐢𝐬𝐦
Write code that works with multiple types through a common interface.
- Example: Define a Shape interface with a draw() method. Now Circle, Rectangle, and Triangle each implement draw() their own way. A single drawShape(Shape s) method works with all of them.</p>
]]></content:encoded>
      <guid>https://christova.writeas.com/oop-principles</guid>
      <pubDate>Thu, 26 Mar 2026 13:35:47 +0000</pubDate>
    </item>
    <item>
      <title>SOLID Principles</title>
      <link>https://christova.writeas.com/solid-principles?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;#SOLID #OOP #SystemDesign]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/5G0EtwQD.jpeg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:SOLID" class="hashtag"><span>#</span><span class="p-category">SOLID</span></a> <a href="https://christova.writeas.com/tag:OOP" class="hashtag"><span>#</span><span class="p-category">OOP</span></a> <a href="https://christova.writeas.com/tag:SystemDesign" class="hashtag"><span>#</span><span class="p-category">SystemDesign</span></a></p>
]]></content:encoded>
      <guid>https://christova.writeas.com/solid-principles</guid>
      <pubDate>Sun, 01 Mar 2026 03:40:05 +0000</pubDate>
    </item>
    <item>
      <title>Object Oriented Programming Fundamentals</title>
      <link>https://christova.writeas.com/object-oriented-programming-fundamentals?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;#OOP #ObjectOrientedProgramming]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/9rQlV10H.jpg" alt=""/></p>

<p><a href="https://christova.writeas.com/tag:OOP" class="hashtag"><span>#</span><span class="p-category">OOP</span></a> <a href="https://christova.writeas.com/tag:ObjectOrientedProgramming" class="hashtag"><span>#</span><span class="p-category">ObjectOrientedProgramming</span></a></p>
]]></content:encoded>
      <guid>https://christova.writeas.com/object-oriented-programming-fundamentals</guid>
      <pubDate>Tue, 10 Dec 2024 19:27:44 +0000</pubDate>
    </item>
  </channel>
</rss>