<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Navodya Dhanushka on Medium]]></title>
        <description><![CDATA[Stories by Navodya Dhanushka on Medium]]></description>
        <link>https://medium.com/@navodyadhanushka01?source=rss-8a24097f937f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8ckG1kBusHZZQaKQ</url>
            <title>Stories by Navodya Dhanushka on Medium</title>
            <link>https://medium.com/@navodyadhanushka01?source=rss-8a24097f937f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 09:41:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@navodyadhanushka01/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Dockerfile]]></title>
            <link>https://medium.com/@navodyadhanushka01/dockerfile-0017aaf0c0dd?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0017aaf0c0dd</guid>
            <category><![CDATA[dockerfile-env]]></category>
            <category><![CDATA[dockerfile-example]]></category>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[what-is-dockerfile]]></category>
            <category><![CDATA[dockerfile-basic]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 05:25:19 GMT</pubDate>
            <atom:updated>2025-12-17T05:26:31.735Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker Part 5</p><p>Dockerfile එකක් කියන්නේ උපදෙස් මාලාවක් Dockerfile එකකින් docker image එකක් create කරගන්න පුළුවන් වෙනවා. ඒ කියන්නේ docker image එක හදන්න ඕනි කොහොමද කියලා Dockerfile එකෙන් අපි කියනවා. Docker file එක create කරද්දී හරියටම මේ spellings use කරන්නම් ඕනි <strong>Dockerfile </strong>නැත්නම් image එක create වෙද්දී failed වෙනවා. Dockerfile එක create කරද්දී අපේ files ඔක්කොම මේ image එකේ තියන නිසා අපිට ඕනි තැනකදී container එකක් හදලා access කරන්න පුළුවන් වෙනවා අමුතුවෙන් volume එකක් විදිහට files ටික පාස් කරගන්න ඕනි වෙන්නෙ නෑ.</p><p>Dockerfile එකට මුලින්ම base image එක දෙන්න ඕනි ඒක අපේ usecase එක අනුව වෙනස් වෙනවා. ඊට පස්සේ files ටික add කරගන්න ඕනි වෙනවා.</p><p>FROM nginx:latest</p><p>ADD . /usr/share/nginx/html</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*em7OOA0pdC_0MX5VNsfoyw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0017aaf0c0dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Volume]]></title>
            <link>https://medium.com/@navodyadhanushka01/docker-volume-a6f62c01c099?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6f62c01c099</guid>
            <category><![CDATA[docker-container-devops]]></category>
            <category><![CDATA[docker-volume]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops-docker]]></category>
            <category><![CDATA[docker-in-devops]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 05:18:45 GMT</pubDate>
            <atom:updated>2025-12-17T05:18:45.682Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker Part 04</p><p>මොකක්ද මේ Docker Volume කියන්නේ Docker Volume එකක් කියන්නේ Host os එකටයි Container එකටයි පොදුවේ use කරන්න පුළුවන් space එකක් folder එකක් දෙකටම පොදු කුලකයකි.</p><p>ඒ වගේම Host os එකෙන් file එකක් මේ volume එකට add කරොත් ඒ file එක container එකෙන් access කරන්නත් පුළුවන් ඒ වගේම container එකෙන් දැම්මොත් Host os එකෙන් access කරන්නත් පුළුවන් වෙනවා file එකක් delete කරොත් ඒ process එකම වෙනවා.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*sArWLqY9ZcdWfeLLfFMsIQ@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6f62c01c099" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Image Pull]]></title>
            <link>https://medium.com/@navodyadhanushka01/docker-image-pull-d4aeb5dc8831?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4aeb5dc8831</guid>
            <category><![CDATA[port-mapping]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-container]]></category>
            <category><![CDATA[docker-port-mapping]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Wed, 24 Sep 2025 14:27:38 GMT</pubDate>
            <atom:updated>2025-09-24T18:22:16.603Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker Image Pull</p><p>Docker Part 03</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*S_YpwanqX73wle0mYJbucw@2x.jpeg" /></figure><p>අද අපි බලමු අපි මේ කතා කරගෙන ආපු මේ Docker Image එක use කරන්න ගන්නේ කොහොමද කියලා. මුලින්ම අපි Docker Image එකක් ගන්න ඕනි ඒක Docker Image Pull කියලා කියනවා. Docker Images pull කරගන්න අපි <a href="https://hub.docker.com/">https://hub.docker.com</a> website එක use කරනවා.</p><p>මේ website එකේ ගොඩක් companies වල docker images දැක ගන්න පුළුවන් අපි උදාහරණයක් විදිහට nginx docker image එකක් pull කරන විදිහ බලමු. මුලින්ම website &gt;&gt; nginx docker image &gt;&gt; documentation දැන් මේ nginx docker image එක pull කරගන්න පහළ code එක භාවිතා කරනවා.</p><pre>docker pull nginx </pre><p>මේ code එක powershell එකේ run කරගන්න ඕනි. මේක run කරන්න අපේ docker desktop එකත් running status එකේ තියෙන්න ඕනි. සාර්ථකව image එක pull වුණා ද බලන්න මේ code එකෙන් පුළුවන් වෙනවා.</p><pre>docker images</pre><p>ඒ වගේ visually බලා ගන්න docker desktop එකේ images category එක යටතේ බලා ගන්නත් පුළුවන් වෙනවා. දැන් බලමු මේ docker image එකෙන් container එකක් හදාගන්නේ කොහොමද කියලා ඒකට පහළ code එක run කරගන්න ඕනි</p><pre>docker run -d nginx:latest</pre><p>මේ code එකේ “-d” කියන්නේ container එක ditched mode එකේ run වෙන්න පටන් ගන්න කියන එක ඒ කියන්නේ container එක background එකේ run වෙන්න පටන් ගන්නවා. මේ code එක run වුණාම container id එක automatically generate වෙනවා. දැන් බලමු running status එකේ තියන containers මොනවද කියලා</p><pre>docker container ls<br>docker ps</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*rQyj2nWOP5lhCWAtovDoKw@2x.jpeg" /></figure><p>මේ බලමු අපි මේ port එක කියන්නේ මොකක්ද කියලා මේක Container එකට specifie වෙච්ච port එකක් තමා ඔය port 80/tcp කියලා පෙන්නනලා තියෙන්නේ මේ port එක local port එකක් නෙමෙයි direct use කරන්න බෑ ඒ හින්ද අපි මේ port එක expose කරගන්න ඕනි. මේ port exposing කියන්නෙ සරලවම container එකේ port එක local machine එකේ port එකක් එක්ක map කරන එකයි. ඒක කරන්න මුලින්ම docker container එක stop කර ගන්න ඕනි.</p><pre>docker stop d2519d0e56a2</pre><p>Code එක යොදාගන්නවා. “d2519d0e56a2” – container id එක.</p><p>දැන් අපි port exposing එකක් කරන්නේ කොහොමද බලමු exposing එක කරන්න</p><pre>docker run -d -p 8080:80 nginx:latest</pre><p>Code එක භාවිතා කරනවා මේකේ “-p” කියන්නේ port එක 8080 කියන්නේ local port එක 80 කියන්නේ container port එකයි.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*iiuByokG_NzPLwaRGAXaiQ@2x.jpeg" /></figure><p>Port exposing එක හරියටම map වෙලාද බලාගන්න පුළුවන් අපිට localhost:8080 run කරගෙන.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*jLPbka2BH1bMXqfX33ATSQ@2x.jpeg" /></figure><p>ඒ වගේම multiple ports expose කරන්නත් පුළුවන් මුලින්ම run වෙන containers stop කරන් ඉන්න ඕනි ඊට පස්සේ පහළ code එකෙන් multiple ports map කරන්න පුළුවන්.</p><pre>docker run -d -p 8080:80 -p 3000:80 nginx:latest</pre><p>මේකත් localhost:8080, localhost:3000 run කරලා map වෙලාද බලාගන්න පුළුවන් වෙනවා.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*WiNWFJrckb3wfwwGlvE78w@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4aeb5dc8831" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker]]></title>
            <link>https://medium.com/@navodyadhanushka01/docker-71d23f87adc9?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/71d23f87adc9</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-desktop]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[docker-container]]></category>
            <category><![CDATA[wslinux]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 09:03:05 GMT</pubDate>
            <atom:updated>2025-08-07T09:03:47.005Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker</p><p>Docker Part 02</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*64HCUl8i2nj1QL4_oZuQXg@2x.jpeg" /></figure><p>දැන් අපි බලමු මොකක්ද මේ Docker කියන්නේ කියලා</p><p>කලින් අපි කතා කරා වගේ ම Docker කියන්නේ Dependency Hell Solution එකක් වන Containers එකක්. මේ Docker Containers එක lightweight වගේම minimum resources use කරනවා. ඒ නිසා virtual machine වලට වඩා ඉතාමත් පහසුයි.</p><p>Docker use කරන්න අපි මුලින්ම Docker Desktop එක install කරන් ඉන්න ඕනි https://www.docker.com/products/docker-desktop/</p><p>මේ Docker desktop එක install කරන් run කරගන්න අපේ local machine එකේ WSL(Windows Subsystem For Linux) install කරන් තියෙන්නත් ඕනි. දැන් අපිට Docker desktop එක use කරන්න පුළුවන්.</p><p>දැන් බලමු මොනවද මේ Docker Image හා Docker Container එකක් කියන්නේ කියලා</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*kl6Hc7-Jzafv5tkImUex9g@2x.jpeg" /></figure><p>මුලින්ම Docker File එක ගැන දැනගමු Docker file එකක කියන්නේ set of instructions අඩංගු file එකක් Docker image එක create කරන්න යොදාගන්න. දැන් බලමු Docker Image එකක් කියන්නේ මොකක්ද Docker image එකක් කියන්නේ සරලවම සැකිල්ලක් අච්චුවක් template එකක් blueprint එකක් වගේ එකක්. මේ image file එකේ අපේ application එක run වෙන්න අවශ්‍ය වෙන සෑම library, dependency එකක්ම ඇතුලත් වෙනවා. ඒ වගේම මේ Docker image එකකින් ඒ සැකිල්ලෙන් අච්චුවෙන් Docker Containers ඕනෑම ගණනක් create කිරීමට පුළුවනි.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*pUToqorvkv5RxQ9JHNXVsg@2x.jpeg" /></figure><p>දැන් බලමු මොකක්ද මේ Docker Container එකක් කියන්නේ කියලා. Docker Container එකක් කියන්නේ මුලින් කිව්ව Docker image file එක run වීමෙන් create වෙන instance එකක්. ඒ container එක image file එකේ අඩංගු වුණ libraries &amp; dependencies වලින් හැදිල තියනවා. මෙන්න මේ container එක තමා අපි අපේ application එක run කරන්න භාවිතා කරන්නේ.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*CypwLB3XIT3LF5AgGtmS_A@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71d23f87adc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction Of Docker]]></title>
            <link>https://medium.com/@navodyadhanushka01/introduction-of-docker-5ecba669b1f6?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ecba669b1f6</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-container]]></category>
            <category><![CDATA[dependency-hell]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 06:31:28 GMT</pubDate>
            <atom:updated>2025-09-24T14:28:27.828Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker Part 01</p><p>මොකක්ද මේ Docker කියන්නේ</p><p>මුලින්ම අපි බලමු Docker use කරන්නේ ඇයි use කරන්න ඕනි වෙන්නෙ (Problem) ඇයි කියලා</p><p>ඒ ගැන කතා කරද්දී මුලින්ම බලන්න ඕනි මොකක්ද මේ Dependency Hell කියන්නේ කියලා ඒකෙත් මුලින්ම මොනවද මේ Dependency කියන්නේ කියලා</p><p>Dependency එකක් කියන්නේ අපි Software එකක් Develop කරන් යද්දී අපිට ඕනි වෙන Install කර ගන්න ඕනි වෙන Library, Packages, Tools වලට තමා අපි Dependency කියලා හදුන්වන්නේ. ඒවා local machine එකෙන් එකට වෙනස් වෙන්නෙ user install කරල තියන versions නිසා මේ නිසා software එක develop කරපු machine එකේ හැර වෙන local machine එකක run කරද්දී version conflicts, update කරනකොට errors වගේ ප්‍රශ්න මතු වෙනවා. මේක තමා Dependency Hell එකක් කියලා හදුන්වන්නේ. මේක තවත් තේරුම් ගන්න මේකත් බලන්න <a href="https://www.linkedin.com/posts/naveenhettiarachchi98_%E0%B6%B8%E0%B6%9A%E0%B6%9A%E0%B6%AF-%E0%B6%B8-dependency-hell-%E0%B6%9A%E0%B6%BA%E0%B6%B1%E0%B6%B1-activity-7358353596075139072-B86T?utm_source=share&amp;utm_medium=member_ios&amp;rcm=ACoAAECdg3EB6q4fJnPjS3vPiR_vmwsEd8-1gp8">https://www.linkedin.com/posts/naveenhettiarachchi98_%E0%B6%B8%E0%B6%9A%E0%B6%9A%E0%B6%AF-%E0%B6%B8-dependency-hell-%E0%B6%9A%E0%B6%BA%E0%B6%B1%E0%B6%B1-activity-7358353596075139072-B86T?utm_source=share&amp;utm_medium=member_ios&amp;rcm=ACoAAECdg3EB6q4fJnPjS3vPiR_vmwsEd8-1gp8</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*4k3EjblagNrbzSXWIKJyjA@2x.jpeg" /></figure><p>දැන් අපි බලමු මේ Dependency Hell problem එක Solve කරන්න තියන විදි ගැන. Dependency Hell solutions විදිහට අපිට Virtual Machines &amp; Containers හදුන්වා දෙන්න පුළුවන් ඒ අතරින් best option එක විදිහට හදුන්වන්නේ Containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*JIHjS0Cr4_aqkMzYZW194A@2x.jpeg" /></figure><p>Containers වර්ග අතරින් suitable මෙන්ම බොහෝ සේ භාවිතා වෙන Container එක ලෙස යොදාගන්නේ මේ Docker Container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*rCjp1ffWaXxqSvtx93E79g@2x.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ecba669b1f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OOP ( Object Oriented Programming)]]></title>
            <link>https://medium.com/@navodyadhanushka01/oop-object-oriented-programming-7ce393ee66ea?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ce393ee66ea</guid>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[oops-in-java]]></category>
            <category><![CDATA[java-oops-concept]]></category>
            <category><![CDATA[object-oriented-concepts]]></category>
            <category><![CDATA[oop-concepts]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Tue, 01 Jul 2025 14:05:33 GMT</pubDate>
            <atom:updated>2025-07-01T14:10:05.113Z</atom:updated>
            <content:encoded><![CDATA[<p>අපි අද බලමු මොනවද මේ OOP Concepts නැත්නම් Object Oriented Programming Concepts කියන්නේ කියලා සරලව තේරෙන්න code implementation නැතිව. ප්‍රධාන සංකල්ප හයකින් මේ OOP සමන්විත වෙන්වා.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*ZyG5yr6kbTevnqFssGw9GA@2x.jpeg" /></figure><ol><li>Class</li><li>Object</li><li>Encapsulation</li><li>Abstraction</li><li>Inheritance</li><li>Polymorphism</li></ol><p>බොහෝවිට මෙහි සදහන් Class &amp; Object නොමැතිව ද මෙම OOP Concepts යන්න හදුන්වනු ලබනවා.</p><h3>මුලින්ම අපි බලමු මොනවද මේ Object</h3><p>Object එකක් කියන්නේ යම් කිසි දෙයක් යම්කිසි වස්තුවක් නැතහොත් දත්ත (data) සහ ඒ දත්තට අදාල ක්‍රියාවන් (actions ) එකට එකතු කරලා තියන ඒකකයක්.</p><p>උදාහරණය:</p><p>ඔයාගේ වාහනය (vehicle) – එක object එකක් වගේ:</p><ul><li>දත්ත (data): brand එක, model එක, year එක</li><li>ක්‍රියාවන් (actions): start කරන්න, drive කරන්න, brake එක apply කරන්න</li></ul><h3>දැන් අපි බලමු මොනවද මේ Classes කියන්නේ කියලා</h3><p>Class එකක් කියන්නේ අපි කලින් කතා කරපු Object එකක් හදාගන්න භාවිතා කරන සැලැස්මක් ආකෘතියක් (Blueprint) වගේ එකක් ඒ කියන්නේ, class එකක තියෙන්නේ object එකකට තියෙන ගුණාංග (attributes / properties) සහ ක්‍රියාකාරකම් (methods / functions) නිවැරදිව විස්තර කරලා. ඒකෙන් object හදන්න පුළුවන්, ඒත් class එක තමයි හැඳින්වීමේ ආකෘතිය. Object එකක් කියන්නේ, ඒ class එකෙන් හදපු සජීවී උදාහරණය.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Yb2Kk2a4nbYCGeeG__Tpuw@2x.jpeg" /></figure><pre>class Car {<br>    String brand;<br>    String color;<br>    int year;<br><br>    void start() {<br>        System.out.println(brand + &quot; is starting...&quot;);<br>    }<br><br>    void drive() {<br>        System.out.println(brand + &quot; is driving...&quot;);<br>    }<br>}</pre><pre>public class Main {<br>    public static void main(String[] args) {<br>        Car maruti = new Car();<br>        maruti.brand = &quot;Maruti&quot;;<br>        maruti.color = &quot;Red&quot;;<br>        maruti.year = 2020;<br>        maruti.start();<br>        maruti.drive();<br><br>        System.out.println();<br><br>        Car audi = new Car();<br>        audi.brand = &quot;Audi&quot;;<br>        audi.color = &quot;Black&quot;;<br>        audi.year = 2022;<br>        audi.start();<br>        audi.drive();<br><br>        System.out.println();<br><br>        Car bmw = new Car();<br>        bmw.brand = &quot;BMW&quot;;<br>        bmw.color = &quot;Blue&quot;;<br>        bmw.year = 2021;<br>        bmw.start();<br>        bmw.drive();<br>    }<br>}</pre><h3>Encapsulation</h3><p>Encapsulation කියන්නේ දත්ත හා ක්‍රියාකාරකම් නැතහොත් data &amp; methods එකතු කර එක් ස්ථානයක class එකක් තුල සගවා තබා ගැනීමයි. දත්ත ආරක්ෂා කර ගැනීමට මෙය භාවිතා කරයි.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*JH7TTSAwTEFiBSPQWmEzBg@2x.jpeg" /></figure><h3>Abstraction</h3><p>Abstraction කියන්නේ සාරාංශකරණය සංකීර්ණ භාවය අඩු කිරීම යන්නයි. ඒ කියන්නේ අවශ්‍ය දේවල් තොරතුරු පමණක් පෙන්වා අනවශ්‍ය දේවල් තොරතුරු සගවා තැබීමයි. මේ සදහා Abstract class හා Interfaces භාවිතා කරනවා.</p><h3>Inheritance</h3><p>මේ concept එකෙන් කියන්නේ සරලවම එක class එකක තියන දේවල් තවත් class එකකට පාවිච්චි කිරීමට අවස්ථාවක් දෙන එක. අලුත් class එකක් (child/subclass) පැරණි එකෙන් (parent/superclass) දේවල් අරගෙන වැඩිදුරටත් දියුණු කරනවා.</p><ol><li>Single Inheritance</li><li>Multilevel Inheritance</li><li>Hierarchical Inheritance</li><li>Multiple Inheritance</li><li>Hybrid Inheritance</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*OtGzqBSL8sqcKExiaKBUMg@2x.jpeg" /></figure><h3>Polymorphism</h3><p>Polymorphism යනුවෙන් සදහන් කරන්නේ එකම සමාන නමකින් යුතු method එකක් විවිධ ආකාරයෙන් හැසිරෙන්න පුළුවන් බව. සරලවම එකම නම තියන method එකක් එක එක අවස්ථාවන් හී එක එක විවිධ වැඩ සිදු කිරීමයි.</p><ol><li>Method Overloading (එකම නම, වෙනස් parameters)</li><li>Method Overriding (child class එකක් parent එකේ method එක වෙනස් කරනවා.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*7HkY48pm3eg2UBgjNW70RA@2x.jpeg" /></figure><p>More Information</p><p><a href="https://youtu.be/DBB2073Qiss?si=juPoVnxiXoSUqVMR">https://youtu.be/DBB2073Qiss?si=juPoVnxiXoSUqVMR</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ce393ee66ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOLID Principles]]></title>
            <link>https://medium.com/@navodyadhanushka01/solid-principles-b42fcadd014b?source=rss-8a24097f937f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b42fcadd014b</guid>
            <category><![CDATA[clean-coding-principles]]></category>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[coding-concepts]]></category>
            <category><![CDATA[solid-principles-in-java]]></category>
            <category><![CDATA[good-coding-practice]]></category>
            <dc:creator><![CDATA[Navodya Dhanushka]]></dc:creator>
            <pubDate>Sat, 21 Jun 2025 08:54:14 GMT</pubDate>
            <atom:updated>2025-07-01T14:08:50.399Z</atom:updated>
            <content:encoded><![CDATA[<p>මොනවද මේ SOLID Principles</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*KwT1lvhfMQUx3bk75lBWpA@2x.jpeg" /></figure><p>S – Single Responsibility</p><p>O – Open/Close Principal</p><p>L – Liskov Substitution</p><p>I – Interface Segregation</p><p>D – Dependency Inversion</p><p>OOP use කරන ප්‍රොජෙක්ට් වල භාවිතා කරන්න තියන guidelines නැතුව rules නෙමේ. Compile errors හෝ මොනයම් වැරද්දක් පෙන්වන්නෙ නෑ. නමුත් system එකේ ඉදිරි කටයුතු පහසුව සදහා මේවා අනුගමනය කිරීම වැදගත්.</p><h4><strong>Single Responsibility</strong></h4><p>මේ කියන්නේ one class, module or function have one work/ one responsibility. ඒක එහෙම නැත්නම් එම functions or classes කුඩා කොටස් වලට කඩලා use කරන්න ඕනි. මේක මෙහෙම use කරන්නේ ඉදිරි යවත්කාලීන කරන කටයුතු වලදී පහසුව සදහා.</p><h4>Open/Close Principal</h4><p>මේ කියන්නෙ one class or module can easy to extend and use ලේසියෙන් වෙන feature එකක් implement කරන්න පුළුවන් වෙන්න ඕනි (Open). ඒ වගේම function එක update කරන්න core logic එක වෙනස් කරන්න අමාරු වෙන්න ඕනි බැරි වෙන්න ඕනි (Close).</p><p>Open for extend (Inheritance)</p><p>Close for modify</p><h3><strong>Liskov Substitution</strong></h3><p>මේ කියන්නේ Super class එකකින් හදන Sub class object එක ක Super class එකේ හැම functionality එකක්ම බිද වැටීමකින් තොරව use කිරීමේ හැකියාව, replace කල හැකි විය යුතුය. එනම් සෑම Sub class එකක්ම Super class එකට සමානව use කල හැකි විය යුතුය.</p><h3>Interface Segregation</h3><p>මේ Interface Segregation කියන්නේ වෙන කෙනෙක් අපේ interface or abstraction class එකක් use කරන්නේ නම් ඔව්න්ට අවශ්‍ය methods පමණක් override කර ගෙන use කරන්න පුළුවන් වෙන්න ඕනි. අනවශ්‍ය methods override or use කර ගැනීමට සැලැස්විය යුතු නැත. ඔවුන්ගේ කාර්යය සදහා අවශ්‍ය methods පමණක් ඔවුන් දැන ගත යුතුය.</p><h3>Dependency Inversion</h3><p>Dependency Inversion කියන්නේ High level module එකක් Low level module එකක් මත රදා පවතින් බෑ. රදා පැවතිය යුත්තේ Interface or Abstraction එකක් මත පමණි. එනම් high level modules තුල low level modules කිසිවක් import නොකල යුතුයි. අවශ්‍ය නම් interface එකක් භාවිතයෙන් ඒවාට access ලබා දිය යුතුය.</p><p>More Information</p><p><a href="https://gnomezgrave.com/2017/11/12/solid-principles-in-object-oriented-designing-in-sinhala/">Object Oriented Designing වල හමු වන S.O.L.I.D. Principles</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b42fcadd014b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>