<?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 Yan Yan Chan on Medium]]></title>
        <description><![CDATA[Stories by Yan Yan Chan on Medium]]></description>
        <link>https://medium.com/@yan_yan?source=rss-66a9a1e4f526------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*r94jX5jSB-NxNmSyDCe9ZQ.jpeg</url>
            <title>Stories by Yan Yan Chan on Medium</title>
            <link>https://medium.com/@yan_yan?source=rss-66a9a1e4f526------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 11:38:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yan_yan/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[Interface Segregation Principle: The way to be a developer]]></title>
            <link>https://medium.com/@yan_yan/interface-segregation-principle-the-way-to-be-a-developer-1775db64e618?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/1775db64e618</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[interface-segregation]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 08:20:50 GMT</pubDate>
            <atom:updated>2022-08-12T05:23:09.959Z</atom:updated>
            <content:encoded><![CDATA[<p>Development ကာလ သို့မဟုတ် code implementation လုပ်တဲ့ အချိန်မှာ code တွေက boilerplate ဖြစ်နေတတ်တယ်။ တစ်ခါတစ်လေ code က refactor မလုပ်ထားဘဲ အရှည်ကြီး boilerplate ဖြစ်နေရင် ဘယ်ကို စပီး handled လုပ်ရမလဲဆိုတာ ကျွန်တော်တို့ မသိနိုင်တော့ဘူး။ ဒါပေမဲ့ senior developers တွေက တစ်နည်းနည်းနဲ့ လုပ်ရင် အဆင်ပြေသွားတယ်။ဘယ်လိုလုပ်လဲပြောရရင် “ <strong><em>All enterprise level developers actively use interfaces </em></strong>” — interface တွေကို ခွဲခွဲပီး လုပ်ကြတယ်။ ဒီ article မှာ SOL<strong>I</strong>D ရဲ့ အတိုကောက် I — Interface Segregation Principle ကို ရှင်းပြသွားမှာဆိုတော့ ဒီ principle ကို နားလည်ရင် interface ကို ဘယ်လို implement လုပ်ရင် ကောင်းလဲဆိုတာ ဖြေရှင်းနိုင်တယ်မယ်လို့ မျှော်လင့်တယ် :)</p><h3>What is Interface Segregation Interface?</h3><blockquote><strong><em>No client should be forced to depend on methods it does not use</em></strong></blockquote><p>ISP လို့ အတိုကောက် ခေါ်တဲ့ Interface Segregation Interface သဘောတရားကို ရှင်းရရင် ကျွန်တော်တို့ code ရေးတဲ့အချိန်မှာ ISP ကို အလွယ်တကူ ချိုးဖောက်နိုင်တယ်။ ဘာလို့လဲဆို software feature တွေ ထပ်ထည့်ပီး ကြီးလာတဲ့အချိန်မှာ သူ့ရဲ့ side effort function တွေများလာလို့၊ ဒါကို ISP က side effort များလာရင် software module တွေကို အဆင့်ဆင့် interface ခွဲပီး independent ဖြစ်အောင် လုပ်ကြတယ်။ အဓိကအချက်က <strong>“you should only define methods that are going to be used” — </strong>အသုံပြုရမဲ့ methods ကိုဘဲ implement လုပ်ရမယ်လို့ ဆိုလိုတာ။</p><h3>Bad Practices</h3><pre>interface IMultiFunction {<br>    public void print();<br>    public void getPrintSpoolDetails();<br>    public void scan();<br>    public void scanPhoto();<br>    public void fax();<br>    public void internetFax();<br>}</pre><p>ဒီ code ကိုကြည့်ရင် ဘာမှမှားတာမရှိဘူးလို့ ထင်လိမ့်မယ်။</p><p>ပထမဆုံးအနေနဲ့ ကြည့်ရမှာက IMultiFunction ရဲ့ code structure က cohesive ဖြစ်လား။ print() နဲ့ getPrintSpoolDetails() က cohesive ဖြစ်တယ်ပြောရမယ်။ ဘာလို့ဆို သူ့ရဲ့ child class အားလုံးက ဒီ function ကိုသုံးနိုင်တယ်။ scan() နဲ့ scanPhoto() ကိုရောအသုံးပြုနိုင်လား? example နောက်တစ်ခုကြည့်ရအောင်</p><pre>class CanonPrinter implements IMultiFunction {<br><br>    @Override<br>    public void print() {}<br><br>    @Override<br>    public void getPrintSpoolDetails() {}<br><br>    /* This machine can&#39;t scan */<br>    @Override<br>    public void scan() {}<br><br>    /* This machine can&#39;t scan photo */<br>    @Override<br>    public void scanPhoto() {}<br><br>    /* This machine can&#39;t fax */<br>    @Override<br>    public void fax() {}<br><br>     /* This machine can&#39;t fax on internet */<br>    @Override<br>    public void internetFax() {}<br><br>}</pre><p>ဒီ example နဲ့ စဥ်းစားကြည့်လိုက်ရင် CanonPrinter က fax() မလုပ်နိုင်တာကို တွေ့ရမယ်။ ဒါပေမဲ့ fax() ကိုမလိုအပ်ဘဲ implement လုပ်နေရတာကို တွေ့ရမယ်။ ဒါက Software Development အရ unimplemented method တွေရှိနေတာက code design ကို poor ဖြစ်စေတယ်။ဘယ်လိုပြန်ပြင်မလဲ</p><h3>Good Practices</h3><blockquote>ISP starts from splitting big interfaces into smaller interfaces.</blockquote><p>ISP အရ big interface ကို smaller interfaces ဖြစ်အောင် လုပ်ရမယ်။ refactored လုပ်ရအောင်</p><pre>interface IPrint {<br>    public void print();<br>    public void getPrintSpoolDetails();<br>}<br><br>interface IScan {<br>    public void scan();<br>    public void scanPhoto();<br>}<br><br>interface IFax {<br>    public void fax();<br>    public void internetFax();<br>}</pre><p>interface တွေကို ခွဲပီး သတ်မှတ်လိုက်တယ်။ ဒီနေရာမှာ small interface ဖြစ်သွားရုံတင် မဟုတ်ဘဲ သူ့တာ၀န်နဲ့သူ ဖြစ်သွားတဲ့အတွက် Single Responsibility Principle ကိုလည်း လိုက်နာသွားတယ်။ တစ်ချက်ခုတ် နှစ်ချက်ပြတ်တဲ့ သဘောတရားတွေကို တွေ့ရမယ်။ သူ့ကို လိုအပ်တဲ့ function အလိုက် child က implement လုပ်နိုင်တယ်။</p><pre>class HPPrintNScanner implements IPrint, IScan {<br><br>    @Override<br>    public void scan() {<br>        // TODO Auto-generated method stub<br>        <br>    }<br><br>    @Override<br>    public void scanPhoto() {<br>        // TODO Auto-generated method stub<br>        <br>    }<br><br>    @Override<br>    public void print() {<br>        // TODO Auto-generated method stub<br>        <br>    }<br><br>    @Override<br>    public void getPrintSpoolDetails() {<br>        // TODO Auto-generated method stub<br>        <br>    }<br><br>}</pre><p>HPPrintNScanner က လိုအပ်တဲ့ interface ကိုဘဲ implement လုပ်နိုင်တာကို တွေ့ရမယ်။</p><p>ISP ချိုးဖောက်တာကို ဘယ်လိုသိိနုင်လဲဆိုရင်</p><ul><li>Interface က low cohesive ဖြစ်နေရင် သိနိုင်တယ်။</li><li>Empty method ကို implement လုပ်ထားရင် သိနိုင်တယ်။</li></ul><h3>Conclusion</h3><p>နောက်ဆုံးအနေနဲ့ သင့်ရဲ့ code quality တိုးတက်နိုင်မဲ့ techniques တွေကို ဒီ article မှာ ရနိုင့်မယ်။ ဒါက software ကို scalable application လုပ်ဖို့ အကောင်းဆုံနည်းလမ်းတွေပါ။ Practice များများလုပ်ပီး နားလည်သွားရင် developer ကောင်းဖြစ်လာနိုင်ပါတယ်။</p><p><a href="https://paigeshin1991.medium.com/interface-segregation-principle-your-only-way-to-be-a-super-competent-developer-698a7976e7f2">reference…</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1775db64e618" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Liskov Substitution Principle: Improves the quality of your code]]></title>
            <link>https://medium.com/@yan_yan/liskov-substitution-principle-improves-the-quality-of-your-code-1286e6257790?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/1286e6257790</guid>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[liskov-substitution]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Thu, 28 Jul 2022 07:42:28 GMT</pubDate>
            <atom:updated>2022-07-28T07:42:28.158Z</atom:updated>
            <content:encoded><![CDATA[<p>code ရေးတဲ့ အချိန်မှာ senior တစ်ယောက်ယောက်ကနေ မင်း code တွေက logically အရ မှန်လား ၊ robust ရောဖြစ်ရဲ့လား မေးနိုင်တယ်၊ ဒါတွေကို ဖြေရှင်းဖို့ software principle တွေကို သိထားမှ အဆင်ပြေမယ်၊ ဒီ article မှာ SO<strong>L</strong>ID ရဲ့ Liskov Substitution Principle ကို ဖော်ပြသွားပါမယ် အတိုကောက် LSP လို့ခေါ်ကြတယ်။</p><h3>What is Liskov Substitution Principle? and What does it do?</h3><p><strong>LSP </strong>ရဲ့ အကျဉ်းချုပ်ကို ဆိုရရင်</p><blockquote>Objects should be replaceable with their subtypes without affecting the correctness of the program.</blockquote><p>Object တစ်ခုကို သူ့ရဲ့ subtypes တွေနဲ့ အစားထိုးနိုင်ရမယ်။ example နဲ့ ကြည့်ရအောင်</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*oJsJsNEtzvYocqBfpa-IJg.png" /><figcaption>sub-type from parent type</figcaption></figure><p>HatchBack က car အမျိုးအစားဖြစ်တယ်၊ Ostrich က Bird ၊ Gasoline က fuel ဖြစ်တယ်။ code အနေနဲ့ ရေးရင်</p><pre>class Car {<br><br>}<br><br>class Hatchback extends Car {<br><br>}<br><br>class Bird {<br><br>}<br><br>class Ostrich extends Bird {<br><br>}<br><br>class Fuel {<br><br>}<br><br>class Gasoline extends Fuel {<br>    <br>}</pre><p>LSP အရဆို car ကို Hatchback ဖြင့် အစားထိုးနိုင်သည်။ ထို့ကြောင့် bird ကို Ostrich နှင့် fuel ကို Gasoline ဖြင့် အစားထိုးနိုင်သည်။ ဒါဆိုရင် အဆင်ပြေတယ်။ LSP ကို ချိုးဖောက်တဲ့ code ကို ဘယ်လိုပြင်မလဲ example နဲ့ ကြည့်ရအောင်</p><h4>[1] Violation of LSP Example 1, Fix by Breaking The Hierarchy</h4><blockquote>Break the hierarchy if it fails the substitution test.</blockquote><p><strong>(1) car အားလုံးမှာ ကားအတွင်းခန်း( car cabin) ရှိလား ကြည့်ရအောင်</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*wmuIoKZycD8RBaMPcdYNJQ.png" /><figcaption>racing car doesn’t have cabin</figcaption></figure><p>Racing car မှာ ကားအိမ်မရှိဘူး၊ အော်က code ကိုကြည့်</p><pre>public class Car {</pre><pre>public double getCabinWidth() {<br>	 // return cabin width <br>     }</pre><pre>}</pre><pre>public class RacingCar extends Car {</pre><pre>@Override<br>     public double getCabinWidth() {<br>         //UNIMPLEMENTED!<br>     }    <br> <br>     public double getCockpitWidth() {<br>	 // return cockpit width <br>     }</pre><pre>}</pre><p>car cabin မရှိတဲ့အတွက်ကြောင့် unimplemented ဖြစ်နေတယ်။ ဒီ code က software design အရ မှားနေတယ်လို့ ပြောရမယ် ဘယ်လိုပြန်ပြင်မလဲ</p><p><strong>(2) Break the hierarchy</strong></p><pre>public class Vehicle {<br> <br>     public double getInteriorWidth() {<br> // return interior width <br>     }<br><br>}<br><br>public class Car extends Vehicle {<br>  <br>     @Override<br>     public double getInteriorWidth() {<br>  return this.getCabinWidth();<br>     }<br><br>     public double getCabinWidth() {<br> // return cabin width<br>     }<br>  <br>}<br><br>public class RacingCar extends Vehicle {<br><br>     @Override<br>     public double getCabinWidth() {<br>   return this.getCockpitWidth();<br>     }<br><br>     public double getCockpitWidth() {<br>  // return cockpit width <br>     }<br><br>}</pre><p>Car ကို inheriting လုပ်မဲ့အစား Vehicle class ကို create လုပ်ပီး inheriting လုပ်ပီးဖြေရှင်းလိုက်တယ်၊ ဒီလိုဆို LSP principle အတိုင်းဖြစ်သွားမယ် code designအရ ပိုကောင်းသွားမယ်၊</p><h3>[2] Violation of LSP Example 2</h3><blockquote>Object ကို cast လုပ်စရာမလိုဘဲ အစားထိုးနိုင်ရမယ် “ Tell, Don’t ask ”</blockquote><p><strong>(1) Bad Practice. Casting</strong></p><pre>public class Product {<br>		<br>     protected double discount = 20;<br>		<br>     public double getDiscount() {<br>         return discount; <br>     }<br><br>}<br><br>public class InHouseProduct extends Product {<br><br>     public void applyExtraDiscount() {<br>         discount = discount * 1.5; // multiplies 1.5 times <br>     }	<br><br>}public class PrincingUtils {<br><br>     public static void main(String[] args) {<br>	<br>         Product p1 = new Product();<br>	 Product p2 = new Product();<br>	 Product p3 = new InHouseProduct();<br>	<br>	 List&lt;Product&gt; productList = new ArrayList&lt;&gt;();<br>	<br>         productList.add(p1);<br>	 productList.add(p2);<br>	 productList.add(p3);<br>	<br>	for(Product product : productList) {<br>	    if (product instanceof InHouseProduct) {<br>		// Type casting<br>		// Not Correct Way <br>		((InHouseProdcut) product).applyExtraDiscount();<br>	     }<br>	     <br>             System.out.println(product.getDiscount());	 }<br>    }<br><br>}</pre><p>ဒီ code မှာ ဘယ်အပိုင်းက problem ရှိနေလဲဆိုရင်</p><pre>if (product instanceof InHouseProduct) {<br>   // Type casting<br>   // Not Correct Way <br>   ((InHouseProdcut) product).applyExtraDiscount()<br>}</pre><p>LSP အရဆို code က မှားနေတယ်၊ rule အရ Object တစ်ခုက သူ့ကို sub types အစားထိုးနိုင်ရမယ် — “<strong><em>Objects should be replaceable with their subtypes without affecting the correctness of the program.”</em></strong></p><p>ဒီ code မှာ sub type အစားထိုးတဲ့နေရာမှာ type cast or asking ပြန်လုပ်နေရတယ်။</p><p><strong>(2) Tell, Don’t ask</strong></p><pre>public class Product {<br>		<br>     protected double discount = 20;<br>		<br>     public double getDiscount() {<br>	 return discount; <br>     }<br><br>}<br><br>public class InHouseProduct extends Product {<br><br>     @Override<br>     public double getDiscount() {<br>	 this.applyExtraDiscount();<br>	 return discount; <br>     }<br><br>     public void applyExtraDiscount() {<br>	  discount = discount * 1.5; // multiplies 1.5 times <br>     }	<br><br>}<br>public class PricingUtils {<br><br>     public static void main(String[] args) {<br><br>	 Product p1 = new Product();<br>	 Product p2 = new Product();<br>	 Product p3 = new InHouseProduct();<br>	<br>	 List&lt;Product&gt; productList = new ArrayList&lt;&gt;();<br>	<br>	 productList.add(p1);<br>	 productList.add(p2);<br>	 productList.add(p3);<br>	<br>	 for(Product product : productList) {<br>	      System.out.println(product.getDiscount());<br>	 }<br><br>     }<br><br>}</pre><p>InHouseProduct class မှာ getDiscount() method ကို overide လုပ်လိုက်မယ်၊ သူ့ရဲ့ function ကို redefine ပြန်လုပ်လိုက်တယ်။</p><p>အကျိုးနေနဲ့ PricingUtil class မှာ sub class က type ကို cast လုပ်စရာမလိုဘဲ loop ပတ်လို့ရသွားမယ် ၊ ဒါကြောင့် code ကို “Tell, Don’t ask’’ ဖြစ်အောင်ရေးပါ။</p><h4>Conclusion</h4><p>Robust software ဖြစ်အောင် ရေးဖို့ design ချတဲ့ခါ LSP ကိုလိုက်နာရပါမယ်။ class hierarchy ကိုကြည့်ပီး ဘယ်ကောင်တွေ logically အရ failed ဖြစ်နေလဲဆိုတာကို ရှာပီး testing လုပ် ပီးရင် refactoring ပြန်လုပ် ဒီလို ထပ်ခါထပ်ခါ လုပ်ရင်း ပိုနားလည်လာမယ်။ logically အရမှန်ရင် code လည်း တိကျမှုရှိလာပါမယ်။</p><p><strong>‘intentional practices’ များများလုပ်ဖို့တော့ လိုပါမယ်။</strong></p><p><a href="https://paigeshin1991.medium.com/liskov-substitution-principle-top-developers-technique-which-improves-2-5x-d8af89e07afb">reference…</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1286e6257790" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dependency Inversion Principle: How you should write code]]></title>
            <link>https://medium.com/@yan_yan/dependency-inversion-principle-how-you-should-write-code-95d91fa3a69?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/95d91fa3a69</guid>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[dependency-inversion]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Wed, 27 Jul 2022 07:27:57 GMT</pubDate>
            <atom:updated>2022-08-13T02:57:20.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*CEW-_QF-eBUQpf8CSoCHVw.png" /><figcaption>depend on interface A</figcaption></figure><p>စကေးချွတ်ပီး လစာကောင်းတဲ့ developer ဖြစ်ဖို့ TDD(Test Driven Development) ကိုသိထားသင့်တယ်၊ အများအားဖြင့် software company တွေမှာ TDD approve နဲ့ရေးကြတယ်။ TDD ကိုမလုပ်ခင် SOLID ရဲ့ Dependency Inversion Principle ကိုနားလည်ထားသင့်တယ်။ fresher တွေတော့ နားလည်ဖို့မလွယ်ပေမဲ့ အလွယ်ကူဆုံးဖြစ်အောင် ဒီ article မှာရှင်းပြသွားပါမယ်။</p><p>What is DIP?</p><p>D ဆိုတဲ့ SOLID ရဲ့ အတိုကောက်၊ သူ့ကိုရှင်းရင်</p><blockquote>High-level modules should not depend on low-level modules. Both should depend on abstractions.</blockquote><p>Structure ကောင်းတဲ့ code ကို ကြည့်လိုက်ရင် code base က hierarchy(အဆင့်ဆင့်) အလိုက် ရှိတယ်၊ high-level module နဲ့ low-level module ဆိုပီး ရှိတယ်၊ fresher တွေက ဒါကိုနားလည်မှုလွဲနိုင်တယ်၊ low-level ကနေ high-level ကို directly depend သွားလုပ်ကြတယ်။နားလည်အောင် အောက်က code ကိုကြည့်</p><pre>import java.util.Arrays;<br>import java.util.List;</pre><pre>// High Level Module <br>class ProductCatalog {<br><br>    public void listAllProducts() {<br><br>        SQLProductRepository sqlProductRepository = new SQLProductRepository();<br><br>        List&lt;String&gt; allProductNames = sqlProductRepository.getAllProductNames();<br><br>        // Display product names<br><br>    }<br><br>}</pre><pre>// Low Level Module <br>class SQLProductRepository {<br><br>    public List&lt;String&gt; getAllProductNames() {<br>        return Arrays.asList(&quot;soap&quot;, &quot;toothpaste&quot;, &quot;shampoo&quot;);<br>    }<br><br>}</pre><p>ဒီမှာProductCatalog က SQLProductRepository implementation class ကို create လုပ်လိုက်တယ်။ OOP အရ extend to interface, not to implementation ဖြစ်ရမှာ၊ အဲ့တော့ ProductCatalogclass( high-level module) က sub-module(low-level module) ဖြစ်တဲ့ SQLProductRepository ပေါ်မှာ depend ဖြစ်နေတယ်။ ဒါတွေက code ရေးခါစ မကြာခဏဖြစ်တတ်တယ်။ ပြန်ပြောပါမယ် Dependency Inversion Principle က</p><p><strong>High-level modules should not depend on low-level modules. Both should depend on abstractions.</strong></p><p>ဆိုတော့ code က DIP ကို violation( ချိုးဖောက် ) နေတာကိုတွေ့ရမယ်၊ ဒီလောက်ဆို နားလည်လောက်မယ် ထင်တယ်။</p><p>ဘယ်လိုပြင်မလဲ၊ မပြင်ခင် software design ရဲ့ abstraction ဆိုတာကို ကြည့်ရအောင်</p><h3>What is Abstraction?</h3><p><strong>(1) Code without abstraction</strong></p><pre>class Benz  {<br><br>    public void drive() {<br>                <br>    }<br><br>}<br><br>class CarUtil {<br><br>    public static void drive(Benz benz) {<br>        benz.drive();<br>    }<br><br>}</pre><p>CarUtil class ရဲ့ drive method က Benz instance ကို parameter နဲ့ လက်ခံထားတယ်။ ဒါကြောင့် drive method ကို ခေါ်ရင် Benz instance ကိုထည့်ပေးရမယ်၊ dependency ရှိနေတယ်၊ Software Design အရ tight coupling လို့ခေါ်တယ်။ ဘာလို့ဆို Benz class ရဲ့ drive method ကို ချိန်းရင် CarUtil class ကို direct effect သွားဖြစ်တယ် Bugs ဖြစ်စေနိုင်မဲ့ facts တွေ</p><blockquote><em>Tight Coupling is the most undesirable feature in Software</em></blockquote><p><strong>(2) Code with Abstraction</strong></p><pre>interface Car {<br>    public void drive();<br>}<br><br>class Benz implements Car {<br><br>    @Override<br>    public void drive() {<br>        <br>        <br>    }<br><br>}<br><br>class Tesla implements Car {<br><br>    @Override<br>    public void drive() {<br>        <br>    }<br><br>}<br><br>class CarUtil {<br><br>    public static void drive(Car car) {<br>        car.drive();<br>    }<br><br>}</pre><p>code structure အရ CarUtil ရဲ့ drive method က Benz ကို depend မဖြစ်တော့ဘဲ Car interface ပေါ်မှာဘဲ depend သွားဖြစ်တော့တယ်။ ဆိုလိုတာက Car interface ကို implement လုပ်ထားတဲ့ ဘယ် car မဆို လက်ခံနိုင်တယ်။ ဒါကို abstration လို့ခေါ်သလို loose coupling လို့လည်းခေါ်တယ်။</p><p>Abstration ကို နားလည်သွားရင် အပေါ်က code နဲ့ ပြန်ကြည့်အောင်</p><h3>Refactoring Previous Code with Abstraction</h3><blockquote><strong><em>“Abstractions should not depend on details. Details should depend on abstractions.”</em></strong></blockquote><pre>import java.util.Arrays;<br>import java.util.List;<br><br>// High Level Module <br>class ProductCatalog {<br><br>    public void listAllProducts() {<br><br>        // High Level Module depends on Abstraction <br>        ProductRepository productRepository =  new SQLProductRepository();<br><br>        List&lt;String&gt; allProductNames = productRepository.getAllProductNames();<br><br>        // Display product names<br><br>    }<br><br>}</pre><pre>interface ProductRepository {<br><br>    List&lt;String&gt; getAllProductNames();<br><br>}<br><br>// Low Level Module<br>class SQLProductRepository implements ProductRepository {<br><br>    public List&lt;String&gt; getAllProductNames() {<br>        return Arrays.asList(&quot;soap&quot;, &quot;toothpaste&quot;, &quot;shampoo&quot;);<br>    }<br><br>}</pre><p>ProductCatalog class က SQLProductRepository ပေါ် depend မဖြစ်တော့ဘူး။ ProductRepository interface ပေါ်မှာဘဲ depend သွားဖြစ်တော့တယ်။ဘာကောင်းသွားလဲဆို</p><ul><li>Concrete implementation ဖြစ်တဲ့ SQLProductReopsitoryကို ProductCatalogက direct access မလုပ်ဘဲ interface ကနေတစ်ဆင့် access လုပ်တယ်။ တစ်ခြား database ချိတ်ဖို့လိုအပ်လာရင် နောက် low level class create လုပ်လိုက်ရင် ရတယ်။ Dabase connection ကို ပြောင်းလို့ရသွားမယ်။ MySQL လား Mango ချိတ်မလားဆို interface ကို implement လုပ်ပီး ခေါ်ရုံဘဲ၊</li><li>ProductCatalog ရဲ့ ListAllProducts() မှာ Abstration အပေါ် depend ဖြစ်နေတဲ့ SQL class တွေခေါ်လိုက်ရုံဘဲ၊ loose coupling ဖြစ်တယ်။</li></ul><p>ဒီအထိ ကျွန်တော်တို့ ဘာတွေရလိုက်လဲဆိုရင်</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TDMA_KDNcLcERRCfDSbpUg.png" /><figcaption>before refactoring</figcaption></figure><p>Refactoring မလုပ်ခင် ProductCatalog က SQlProductRepository ပေါ်မှာ depend ဖြစ်တယ်။ high-level module က low-module ပေါ်မှာ depend ဖြစ်တယ်လို့ ပြောရမယ်၊ tight coupling ဖြစ်တယ်။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9fzQngHMfntK5HTtKecoUQ.png" /><figcaption>after refactoring</figcaption></figure><p>ProductCatalog က ProductRepository ပေါ်မှာ depend ဖြစ်တယ်။ SQLProductRepository က ProductRepository ပေါ်မှာဘဲ depend ဖြစ်တယ်။</p><p>Dependency Inversion Principle အရ</p><blockquote>High-level modules should not depend on low-level modules. Both should depend on abstractions.</blockquote><p>စာကြောင်းကို နားလည်သွားမယ်ထင်တယ်။</p><p>နောက်တစ်ဆင့် အနေနဲ့ Dependency Injection ကိုကြည့်ရအောင်</p><pre>import java.util.Arrays;<br>import java.util.List;<br><br>class ProductCatalog {<br><br>    private ProductRepository productRepository;<br><br>    public ProductCatalog(ProductRepository productRepository) {<br>        this.productRepository = productRepository;<br>    }<br><br>    public void listAllProducts() {<br><br>        List&lt;String&gt; allProductNames = productRepository.getAllProductNames();<br><br>        // Display product names<br><br>    }<br><br>}<br><br>interface ProductRepository {<br><br>    List&lt;String&gt; getAllProductNames();<br><br>}<br><br>class SQLProductRepository implements ProductRepository {<br><br>    public List&lt;String&gt; getAllProductNames() {<br>        return Arrays.asList(&quot;soap&quot;, &quot;toothpaste&quot;, &quot;shampoo&quot;);<br>    }<br><br>}<br><br>class EcommerceApplication {<br>    <br>        public static void main(String[] args) {<br>            <br>            ProductRepository productRepository = new SQLProductRepository();<br><br>            ProductCatalog productCatalog = new ProductCatalog(productRepository);<br><br>            productCatalog.listAllProducts();<br>    <br>        }<br>    <br>}</pre><p>ProductCatalog က ProductRepository ကို inject လုပ်ထားတာတွေ့ရမယ်။ ဒီလို Object ဆောက်ပီး inject လုပ်တာက ကောင်းတယ် ဘာလို့ဆို Mock data တွေနဲ့ TDD လုပ်တဲ့ချိန်မှာ အသုံ၀င်လို့ ၊ ဒီ TDD concept တွေကိုနောက်မှ ရှင်းပါတော့မယ်။</p><h4>Conclusion</h4><ul><li>“High-level modules should not depend on low-level modules. Both should depend on abstractions.”</li><li>“Abstractions should not depend on details. Details should depend on abstractions.”</li></ul><p>ဒီစာကြောင်းနှစ်ကြောင်းကို နားလည်ရင် congratulation ပါ DIP principle ကို သင်နားလည်သွားပါပီး။ experience ရှိရင်တော့ လွယ်လွယ်နဲ့ နားလည်နိုင်ပေမဲ့ ၊ မရှိရင် ခတ်နိုင်တယ်။ ဒါကြောင့် experience ရှိဖို့ intentional practice များများလုပ်ဖို့ လိုပါတယ်။</p><p><a href="https://paigeshin1991.medium.com/dependency-inversion-principle-how-google-developers-write-code-f6cbd3b530a6">reference…</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95d91fa3a69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Closed Principle: Make your code cost-free and flexible]]></title>
            <link>https://medium.com/@yan_yan/open-closed-principle-make-your-code-cost-free-and-flexible-2bff62719d54?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bff62719d54</guid>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[open-closed-principle]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 10:19:15 GMT</pubDate>
            <atom:updated>2022-08-12T05:14:08.518Z</atom:updated>
            <content:encoded><![CDATA[<p>အောက်က ပုံမှာ computer က တစ်ခြားအစိတ်အပိုင်း‌တွေနဲ့ extend လုပ်ပီး ချိတ်သုံးနိုင်တယ်။ computer ရဲ့ usb port ကနေ mouse ချိတ်မလား၊ keyboard လား ချိတ်လို့ ရတယ်။ ဒါကို open for extension လို့ ခေါ်တယ်။ ခုဏက ချိတ်လိုက်ရင် computer ကိုပြင်ဖို့လိုလား ( modification လုပ်ဖို့လိုလား) ဆိုတော့မလိုဘူး။ modification လုပ်စရာ မလိုဘူး ဒါကြောင့် close for modification ဖြစ်တယ်။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*_NmvYPdJ2Ff-104tn1E-dQ.jpeg" /><figcaption>Computer is closed for modification but it can be extended</figcaption></figure><p>Software program တွေက feature အသစ်ကြောင့် အမြဲပြောင်းရတယ်။ client လိုချင်တဲ့ changes တွေကို developer တွေက ခဏခဏ build and release ပြန်လုပ်ရတယ်။ မကြာမကြာပြောင်းတော့ bugs တွေက မထင်သလို ဖြစ်တယ်။ Bugs များလို့ ပြန်ပြင်ရင် အချိန်ကုန် ငွေကုန်တယ်။ Bugs တွေကို business အနေနဲ့ကြည့်ရင် money လို့ခေါ်နိုင်တယ်(ငွေကုန်လို့ ) ။ Bugs free ဖြစ်အောင်ဘယ်လိုလုပ်မလဲ? ဒီအတွက် အတော်လေးကောင်းတဲ့ concept ဖြစ်တဲ့ SOLID Principle ရဲ့ OCP concept ကိုရှင်းပြသွားပါမယ်။</p><h3>What is OPEN CLOSED PRINCIPLE?</h3><blockquote>Software components should be closed for modification, but open for extension.</blockquote><p>ဒီစာကြောင်းကို အပေါ်က computer ကိုရှင်းပြထားသလိုဘဲ ၊ မသေချာရင် ပြန်ဖတ်ပါ နားလည်သွားရင် အောက်က code ကို ကြည့်ရအောင်</p><p>ဘာတွေမှားလည်း ရှာကြည့်</p><pre>public class InsuranceCompany {<br>    <br>    public double discountRate(VehicleInsuranceCustomer customer) {<br>        if(customer.isLoyalCustomer()) {<br>            return 20; <br>        }        <br>        return 10;<br>    }<br><br>}<br><br>class VehicleInsuranceCustomer {<br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br>}</pre><p>InsuranceCompany မှာ discountRate() ဆိုတဲ့ method တစ်ခုရှိတယ်။ သူ့ရဲ့ paramater မှာ တစ်ခြား object တစ်ခုကို လက်ခံထားတယ်။ ဒီ object နေရာမှာ တစ် ခြား object တစ်ခုပြောင်းရင်ရော ရနိုင်လား? အပေါ်က code မှာဆိုရင် VehichleInsuranceCustomer ဘဲ လက်ခံနိုင်မယ်။ တစ်ခြား InsuranceCustomer ကို အစားထိုးရင် discountRate method ပါ modify ပြန်လုပ်ရမယ်။ tight coupling ဖြစ်နေတယ် ဘယ်လိုပြင်မလဲ၊ အောက်က code မှာ method ခွဲပီး modify ပြန်လုပ်ထားတယ်။</p><pre>public class InsuranceCompany {    <br>    public double discountRate(VehicleInsuranceCustomer customer) {<br>        if(customer.isLoyalCustomer()) {<br>            return 20; <br>        }        <br>        return 10;<br>    }<br><br>    public double discountRate(HomeInsuranceCustomer customer) {<br>        if(customer.isLoyalCustomer()) {<br>            return 20; <br>        }        <br>        return 10;<br>    }<br><br>    public double discountRate(LifeInsuranceCustomer customer) {<br>      if(customer.isLoyalCustomer()) {<br>          return 20; <br>      }        <br>        return 10;<br>    }<br><br>}<br><br>class VehicleInsuranceCustomer {<br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br>}<br><br>class HomeInsuranceCustomer {<br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br>}<br><br>class LifeInsuranceCustomer {<br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br>}</pre><p>ဒီ code မှာ class duplicated နည်းနဲ့ ဖြေရှင်းထားတာ ။ ဒါပေမဲ့ problem ထပ်ဖြစ်နေတာက method တွေကို ထပ်ခါ duplicated လုပ်ရတာ ၊ တစ်ခြား developer တွေဖတ်ရတာလဲ အဆင်မပြေလှဘူး။ ပိုအရေးကြီးတာက code ကို ထပ်ခါခါပြင်ရတာဘဲ။ ဒါတွေက bugs တွေကို ဖြစ်စေတယ်။ team အလိုက် code ရေးရင်တော့ နားလည်နိုင်တယ်။ code base ကို modify လုပ်တဲ့အတွက် code base လည်းများလာနိုင်သလို bugs လည်းများလာနိုင်တယ်။</p><p>ဒါကို OCP အရ ဘယ်လိုဖြေရှင်းမလဲဆိုတော့</p><pre>public class InsuranceCompany {    // Parameter is now abstracted <br>    public double discountRate(CustomerProfile customer) {<br>        if(customer.isLoyalCustomer()) {<br>            return 20; <br>        }        <br>        return 10;<br>    }<br><br>}// Core <br>interface CustomerProfile {<br>    public boolean isLoyalCustomer();<br>}<br><br>class VehicleInsuranceCustomer implements CustomerProfile {<br>    <br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br>    <br>}<br><br>class HomeInsuranceCustomer implements CustomerProfile {<br>    <br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br>    <br>}<br><br>class LifeInsuranceCustomer implements CustomerProfile {<br>        <br>    public boolean isLoyalCustomer() {<br>        return true; <br>    }<br><br>}</pre><p>interface တစ်ခု ဆောက်လိုက်တယ်။ ဒီ interface နဲ့ ကိုက်ညီမဲ့ class တွေဆောက်လိုက်ရင်ရတယ်။ discountRate method မှာ specific class အစား interface ကို အစားထိုးလိုက်မယ် ဒါက အသက်ဘဲ။ ဒါကို abstration လို့လည်း ခေါ်နိုင်တယ်။ နောက်ထပ်လာနိုင်တဲ့ customer class တွေကိုလည်း interface ခံပီး ပေါင်းနိုင်သလို( open for extension ) သူ့ကိုခေါ်သုံးထားတဲ့ code base တွေလည်း modify လုပ်ဖို့ မလိုတော့ဘူး။( close for modification).</p><p>ဒီကောင်ရဲ့ benefits တွေက</p><ul><li>feature အသစ်ထပ်ထည့်ရင် အဆင်ပြေတယ်။</li><li>developer တွေရဲ့ cost နဲ့ testing time ကိုလည်း လျှော့ကျနိုင်တယ်။</li><li>OCP က decoupling ဖြစ်စေလို့ Single Responsibility Principle ကို auto လိုက်နာသွားတယ်။</li></ul><p>သတိထားရမဲ့ အချက်တွေက</p><p>တစ်ခါတစ်လေ OCP ထက် code duplication လုပ်လိုက်တာ ပိုကောင်းနိုင်တယ်။ ဒါလပေမဲ့ မလိုအပ်ဘဲ class တွေ အများကြီး ရှုတ်ပွတာကလည်း overall design ကို ကြည့်တာ ရှုပ်စေတယ်။</p><h4>Conclusion</h4><p>coding ရေးချိန်မှာ OCP ဘာလဲဆိုတာ သိထားသင့်တယ်။လိုအပ်ချိန်မှာ ထည့်နိုင်ရင် code က ပိုပီး clear ဖြစ်စေမှာ၊ပုံမှန် code ကိုကြည့်ရင်တော့ complex ဖြစ်မှာဘဲ ဒါကို OCP သုံးရင် ရှင်းသွားမလား။ ဒါဆိုရင် refactor ပြန်လုပ် မဟုတ်ရင် မလုပ်နဲ့။</p><ul><li><a href="https://paigeshin1991.medium.com/open-closed-principle-make-your-code-cost-free-and-flexible-49547c9a801a">reference…</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bff62719d54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Single Responsibility Principle: What is SRP?]]></title>
            <link>https://medium.com/@yan_yan/single-responsibility-principle-what-is-srp-ad0cf85bb866?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad0cf85bb866</guid>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[single-responsibility]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Sun, 24 Jul 2022 16:53:09 GMT</pubDate>
            <atom:updated>2022-08-12T05:02:18.971Z</atom:updated>
            <content:encoded><![CDATA[<h3>Single Responsibility Principle: What is SRP? Software Engineer လုပ်နေပီး ဒီ principle ကို သိလားမေးရင်…</h3><p>စမေးရမှာက code refactoring လုပ်ဖူးလားပေါ့။ Code refactoring ဆိုတာ program ရဲ့ correctness ကို မထိခိုက်ဘဲ code ကို ပြန်ပြင်ရေးတာပါ။ Principle တွေမသိဘဲ လုပ်ရင်တော့ ဘာ refactoring ဘဲလုပ်လုပ် code base ကထူးခြားလာမှာမဟုတ်ဘူး။ Spaghetti ပေါ်ကို Spaghetti code refactoringပြန်လုပ်သလိုပါဘဲ။ Spaghetti code ဆိုတာ bad practices ဖြစ်ရင် ခေါ်တဲ့ anti-patterns ထဲက တစ်မျိုးဘဲ။</p><h3>What is Single Responsibility Principle?</h3><p>Software တွေရဲ့ old methodology တစ်အခုဖြစ်တဲ့ SOLID Principleမှာ</p><ul><li><strong>S </strong>stands for <strong>Single Responsibility Principle</strong></li><li><strong>O </strong>stands for <strong>Open Closed Principle</strong></li><li><strong>L </strong>stands for <strong>Liskov Subsitution Princple</strong></li><li><strong>I</strong> stands for <strong>Interface Segregation Principle</strong></li><li><strong>D</strong> stands for <strong>Dependency Inversion Principle</strong></li></ul><p>ဒီ articleမှာ SOLID ရဲ့ အတိုကောက်တွေထဲက တစ်ခုထဲကဖြစ်တဲ့ S ( Single Responsibility Principle ) ကို ဖော်ပြသွားပါမယ်။</p><h3>So then, what does it mean “Single Responsibility Principle?”</h3><blockquote>Every Software module/component should have only one responsibility.</blockquote><p>ဒီနေရာမှာ software module/component တွေက function or class or method တစ်ခုခု တစ်ခါတစ်လေ module level တစ်ခုခုဖြစ်နိုင်ပါတယ်။</p><ul><li>“a class should have one responsibility”</li><li>“a function should tackle only one task”</li></ul><p>Responsibility ဆိုတာ သူ့ရဲ့ လုပ်ဆောင်ချက်( class ရဲ့ set of methods) ကိုဆိုလိုချင်တာ။ အဲ့တော့ classရဲ့ methods များဟာ (တူညီတဲ့ တာဝန်)သူနဲ့ ကိုက်ညီမဲ့ တာဝန်ကိုသာ လုပ်ဆောင်ရမယ်။</p><h4>(1) Always Aim for High Cohesion</h4><blockquote>Cohesionဆိုတာ software component တွေက သူ့ရဲ့ ဘယ်အစိတ်အပိုင်းတွေကိုသာ အသုံးပြုနေလဲ ဆိုတာ တိုင်းတာတဲ့ degree တစ်ခု.</blockquote><p>အောက်က codeကိုကြည့်ပီး ဘာမှားနေလဲ စဥ်းစားကြည့်ပါ။</p><pre>/** Before Refactoring **/  <br>// Too Many Responsibilities <br>// - Measurements of squares <br>// - Rendering images of squares <br>// Before Being Refactored<br>class Square {<br><br>    int side = 5;<br><br>    public int calculateArea() {<br>        return side * side;<br>    }<br><br>    public int calculatePerimeter() {<br>        return side * 4; <br>    }<br><br>    public void draw() {<br>        if (highResolutionMonitor) {<br>            // Render a high resolution image of a square<br>        } else {<br>            // Render a normal image of a square<br>        }<br>    }<br><br>    public void rotate(int degree) {<br>        // Rotate the image of the square clockwise to<br>        // the required degree and re-render <br>    }<br><br>}</pre><p>square class မှာ responsibility နှစ်ခုရှိတယ်ဆိုတာ တွေ့ရမယ်။ Measurement of Square ကိုလုပ်ရသလို render of square ကိုလည်းလုပ်ရတယ်။ဒီနေရာမှာ square ရှာတာနဲ့ render ( draw) လုပ်တာမတူပါဘူး။ render လုပ်တာက UI ပိုင်းရဲ့တာဝန်ပါ။Single responsibility သာဖြစ်ရမဲ့အတွက် refactoring ပြန်လုပ်ဖို့လို ပါတယ်။ Solid principle အရ ဘယ်လို ရေးသင့်လဲ ဆိုရင် အောက်က refactored code version ကိုကြည့်ပါ။</p><pre>/** After Refactoring **/  <br>// Responsibility: Measurements of squares <br>// After Refactoring<br>class Square {<br><br>    int side = 5;<br><br>    public int calculateArea() {<br>        return side * side; <br>    }<br><br>    public int calculatePerimeter() {<br>        return side * 4; <br>    }<br><br>}<br><br>// Responsibility: Rendering images of squares <br>class SquareUI {<br><br>    public void draw() {<br>        if (highResolutionMonitor) {<br>            // Render a high resolution image of a square<br>        } else {<br>            // Render a normal image of a square<br>        }<br>    }<br><br>    public void rotate(int degree) {<br>        // Rotate the iamge of the square clockwise to<br>        // the required degree and re-render <br>    }<br><br>}</pre><p>Square class က measurement ကိုဘဲလုပ်ဆောင်ရပီး squareUI က rendering ပိုင်းကို လုပ်ဆောင်ပါတယ်။ဒီနေရာမှာ ပြောစရာရှိတာက responsibility ကိုခွဲတဲ့အချိန်မှာ မသေချာမရေရာဖြစ်နေရင် ဘယလိုလုပ်လို့ရလဲ ဆိုရင် code cohesion ကိုကြည့်ပီးလည်းဆုံးဖြတ်နိုင်ပါတယ်။အပေါ်က code မှာဆိုရင်</p><ul><li>calculateArea() and calculatePerimeter() က တွက်ချက်တာ ဖစ်တဲ့အတွက် measurement of squareနဲ့ သက်ဆိုင်တယ်</li><li>draw() and rotate() ကဆွဲတာဖြစ်တဲ့အတွက် renderingနဲ့ ပိုသက်ဆိုင်ပါတယ်။</li></ul><p>နောက်ပိုင်း measurement ပိုင်း ပြင်ရင် rendering ပိုင်းကိုသွားထိစရာမလို့တော့သလို rendering ပိုင်းကိုထပ်ထည့်ချင်ရင်လည်း တစ်ခြားပိုင်းတွေ သွားကြည့်စရာမလိုတော့ဘူးပေါ့။ သူ့အပိုင်းနဲ့ သူ့တာဝန်ဖြစ်သွားမယ်။</p><h4>(2) Avoid Tight Coupling</h4><blockquote>coupling ဆိုတာ software component တွေက အပြန်အလှန်မှီခိုနေတာ inter-dependency ရှိတာကို တိုင်းတာတဲ့ degree</blockquote><p>အောက်က example ကိုကြည့်ပီး ဘာမှားလဲ စဥ်းစားကြည့်ပါ။</p><pre>/** Before Refactoring **/  <br>// Tightly Coupled <br>// Responsibility: Handle core student profile data<br>// Responsibility: Handle Database Operations <br>class Student {<br><br>    private String studentId;<br>    private Date studentDOB;<br>    private String address;<br><br>    public void save() {<br>        // Serialize object into a string representation <br>        String objectStr = MyUtils.serialzieIntoAString(this);<br>        Connection connection = null; <br>        Statement stmt = null; <br><br>        // We are using MYSQL<br>        // What if I want to use another database?<br>        // This is why Tight Coupling is bad practices for prgramming <br>        try {<br>            Class.forName(&quot;com.mysql.jdbc.Driver&quot;);<br>            connection = DriverManager.getConnection(&quot;jdbc:mysql://localhost:3306/MyDb&quot;, &quot;root&quot;, &quot;password&quot;);<br>            stmt = connection.createStatement();<br>            stmt.execute(&quot;INSERT INTO STUDENTS VALUES (&quot; + objectStr + &quot;)&quot;);<br>        } catch (Exception e) {<br>            e.printStackTrace();<br>        }<br><br>    }<br><br>    public String getStudentId() {<br>        return studentId;<br>    }<br><br>    public void setStudentId(String studentId) {<br>        this.studentId = studentId;<br>    }<br><br>}</pre><p>ဒီ code မှာ student က class သုံးခုကို handle လုပ်ရတယ်။ save() ဆိုတဲ့ methodက ပြသာနာရှိနေတာတွေ့ရလိမ့်မယ်။ နောက်အ့မှာဘဲ database connection က mySql နဲ့ဘဲ connect ထားတာ။ နောက် database တွေကို connectချင်ရင်ဘယ်လိုလုပ်မလဲ။ Tight coupling ​ဖြစ်နေတာပါ။ Software တစ်ခုမှာ tight coupling ဆိုတာ မရေးသင့်တဲ့ feacture ပါ။ ပြင်ရေးကြည့်ရအောင်</p><pre>/** After Refactoring **/ <br>// Responsibility: Handle Database Operations  <br>public class StudentRepository {<br>    public void save() {<br>        // Serialize object into a string representation <br>        String objectStr = MyUtils.serialzieIntoAString(this);<br>        Connection connect = null; <br>        Statement stmt = null; <br><br>        // We are using MYSQL<br>        // What if I want to use another database?<br>        // This is why Tight Coupling is bad practices for prgramming <br>        try {<br>            Class.forName(&quot;com.mysql.jdbc.Driver&quot;);<br>            connection = DriverManager.getConnection(&quot;jdbc:mysql://localhost:3306/MyDb&quot;, &quot;root&quot;, &quot;password&quot;);<br>            stmt = connection.createStatement();<br>            stmt.execute(&quot;INSERT INTO STUDENTS VALUES (&quot; + objectStr + &quot;)&quot;);<br>        } catch (Exception e) {<br>            e.printStackTrace();<br>        }<br><br>    }<br>}<br><br>// Responsibility: Handle core student profile data<br>class Student {<br><br>    private String studentId;<br>    private Date studentDOB;<br>    private String address;<br><br>    public void save() {<br>        new StudentRepository().save(this);<br>    }<br><br>    public String getStudentId() {<br>        return studentId;<br>    }<br><br>    public void setStudentId(String studentId) {<br>        this.studentId = studentId;<br>    }<br><br>}</pre><p>class က နှစ်ခုဖြစ်သွားမယ် ။ Student Repo က database operation ကိုလုပ်မယ် Student ကသူရဲ့ profile dataတွေဘဲ လုပ်ဆောင်ရပါမယ်။ဒီလိုဆိုရင် database connection ချိန်းချင်ရင် student repo မှာဘဲ တစ်ခြား database connection ကိုပြောင်းလိုက်ရင်ရပီး ၊ responsibility တွေကို တတ်နိုင်သမျှ ခွဲပီး ယူလိုက်ကြတာ။</p><h4>(3) Software component need only one reason to change</h4><p>Software feature တွေက ဘယ်တော့မှ ငြိမ်မှာ မဟုတ်ပါဘူး အမြဲ changing လုပ်နေရမှာဘဲ ဒီလိုချိန်းတာလဲ အထူးအဆန်းတော့မဟုတ်ဘူး။ code ကို ချိန်းရင်တော့ error တတ်နိုင်ခြေက များတယ်။ code ချိန်းလေ bugs ပိုတတ်လေ ဖြစ်တတ်တယ် တစ်ခါတစ်လေ ဘယ်နေရာချိန်းရင်ကောင်းမလဲဆိုပီး pressure တောင်ဝင်နိုင်တယ်။ဒါကြောင့် bugs ကိုနည်းနိုင်သမျှနည်းအောင် နည်းလမ်းရှာရမယ်။</p><p>အပေါ်က refactored code ကိုကြည့်ပီး နောက်တစ်ချိန်မှာ ဘာတွေပြောင်းနိုင်လဲဆိုတာ စဥ်းစားကြည့်ပါ။</p><pre>// Responsibility: Handle Database Operations<br>// Changes might occur   <br>// 1. A change in the database backend, as advised by the technical team.<br>public class StudentRepository {<br>    public void save() {<br>        // Serialize object into a string representation <br>        String objectStr = MyUtils.serialzieIntoAString(this);<br>        Connection connect = null; <br>        Statement stmt = null; <br><br>        // We are using MYSQL<br>        // What if I want to use another database?<br>        // This is why Tight Coupling is bad practices for prgramming <br>        try {<br>            Class.forName(&quot;com.mysql.jdbc.Driver&quot;);<br>            connection = DriverManager.getConnection(&quot;jdbc:mysql://localhost:3306/MyDb&quot;, &quot;root&quot;, &quot;password&quot;);<br>            stmt = connection.createStatement();<br>            stmt.execute(&quot;INSERT INTO STUDENTS VALUES (&quot; + objectStr + &quot;)&quot;);<br>        } catch (Exception e) {<br>            e.printStackTrace();<br>        }<br><br>    }<br>}<br><br>// Responsibility: Handle core student profile data<br>// Changes might occur<br>// 1. A change in Student Data Format <br>class Student {<br><br>    private String studentId;<br>    private Date studentDOB;<br>    private String address;<br><br>    public void save() {<br>        new StudentRepository().save(this);<br>    }<br><br>    public String getStudentId() {<br>        return studentId;<br>    }<br><br>    public void setStudentId(String studentId) {<br>        this.studentId = studentId;<br>    }<br><br>}</pre><ul><li>StudentRepository မှာ ၎င်းရဲ့ database ကို ချိန်းနိုင်ခြေရှိမယ်။</li><li>Student မှာတော့ student ရဲ့ format တွေချိန်းနိုင်ခြေရှိမယ်။</li></ul><p>ပြောင်းလဲနိုင်ခြေ reason တစ်ခုဘဲ ရှိပါတော့မယ်။ Principle အတိုင်း</p><p>Software componet neet only one reason to change</p><h4>Conclusion</h4><p>SRP တစ်ခုထဲနဲ့ solution အားလုံးကို fixed မလုပ်နိုင်ပါဘူး။ eg ဆိုရင် အပေါ်က database connection က tight coupling ဖြစ်နေတယ်။ ဒါကို ဖြေရှင်းဖို့ဆိုရင် တစ်ခြား principle တွေကို သိထားဖို့လိုပါတယ်။ မှတ်ထားရမှာက programmer တွေက responsibility တွေအများကြီးကို တစ်ခါတစ်လေ စုထားတာ ဖြစ်တတ်ပါတယ်။ ဒါကို SRP သုံးပီး သူ့ရဲ့ responsibility အလိုက် refactor ပြန်လုပ်ဖို့က developer တွေမှာ ရှိသင့်တဲ့ skill တစ်ခုဖြစ်ပါတယ်။ SRP ကိုလိုရင် လိုသလိုသုံးနိုင်ရင် code base ကပို clear ဖြစ်ပီး ပို robust ဖြစ်ပါတယ်။ နောက်တစ်ချက်အနေနဲ့ SRP နဲ့ပြောင်းပြန်လို့ပြောလို့ရတဲ့ God obj ဆိုတာရှိတယ်။သူက anti-pattern ( bad practices ကိုဖြစ်စေလို့) ထဲက တစ်ခု။ responsibility တွေ method တွေကို စုပီးရေးထားတာဆိုတော့ concrete ဖြစ်တယ်။ မရေးသင့်ဘူး Maintenanceလုပ်ရတာ တော်တော်ခက်တယ်။</p><ul><li><a href="https://paigeshin1991.medium.com/single-responsibility-principle-what-working-as-a-software-engineer-you-dont-know-it-e74883f92944">reference…</a></li><li><a href="http://thetkhine.com/java/solid-principle-part-1/">reference…</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad0cf85bb866" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solid Principle : Every developer should know]]></title>
            <link>https://medium.com/@yan_yan/solid-principle-eace92fc4d48?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/eace92fc4d48</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[solid-principles]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Sun, 24 Jul 2022 12:15:23 GMT</pubDate>
            <atom:updated>2022-08-12T04:42:56.554Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is solid principle? Why we should take care about it?</strong></p><h4><strong>မိတ်ဆက်</strong></h4><p>ကိုယ်ရဲ့ coding skill ပိုပီးကောင်းမွန်အောင် clean code ကို အခြေခံပီး ဘယ်လို ရေးရမလဲ ။ good practices ဆိုတာတွေကို developer တိုင်း နားလည်ထားသင့်တယ်။ Technical ပိုင်းဖြစ်တဲ့ (languages and frameworks) မကဘဲ သိသင့်သိထိုက်တဲ့ theory တွေဖြစ်တဲ့ algorithms, data structure, design patterns, principles လည်း နားလည်ထားသင့်တယ်။ဒီ article series မှာတော့ OOP ရဲ့ အခြေခံကျတဲ့ solid principle ကို ဆွေးနွေးသွားမယ်။</p><p>well-written code ကို လေ့လာရင်း သဘောကျတဲ့ tips တွေကို ဒီ post မှာရှင်းပြမှာ ဖြစ်တဲ့အတွက် သင့်ရဲ့ <br>coding skill လည်း တိုးတက်လာလိမ့်မယ်လို့ မျော်လင့်ပါတယ်။ ဒီ article က SOLD principle series အစဖြစ်လို့ သူ့ရဲ့ over view ကို ဖော်ပြသွားပါမယ်။</p><h3><strong>So, Why you should know about it?</strong></h3><p>project တစ်ခုကို ပီးအောင် ရေးလိုက်ပီး ဆိုပါဆို့။နောက်ဒီ project မှာဘဲ feature အသစ်တွေ ထပ်ထည့်ချင်တယ်။ ရှိပီးသား code ပါ ပြန် change ရမယ်။ တစ်ခါတစ်လေ ရှိပီးသား program ကို effect သွားဖြစ်တယ်။ effect ဖြစ်တဲ့ code တွေပါ refactoring ပြန်လုပ်ရတယ်။ project time လည်းသွားထိတယ်။ ဒါတွေက principle တွေကို မလိုက်နာဘဲ ရေးထားတဲ့ bad code ရဲ့ အကျိုးဆက်တွေလို့ ပြောရပါလိမ့်မယ်။</p><p>Good code = Changeable<br>Bad code = Concrete (:</p><p>သင် project ရဲ့ code တွေက bad code ဖြစ်နေရင် ဘာမှမဖြစ်ပါဘူး(it’s just normal). တစ်ခါတစ်လေ project က deadline ရောက်နေတာတို့၊ client ရဲ့ pressure ကြောင့်တို့စတဲ့ The Broken window Theory ကို ဖြစ်စေတဲ့ အချက်တွေကြောင့် ဆရာ့ဆရာ programmer တွေတောင် ဖြစ်တတ်ပါတယ်။ ဒီနေရာမှာ ဘာကို သိထားသိလဲဆိုတော့ code တွေက bad code နဲ့ project ပီးသွားတယ်။ ဒါက program ကို breaking လုပ်လိုက်တာ ပီးစလွယ်လုပ်လိုက်တာပါဘဲ။ program ကို solution ထုတ်ပီးရေးထားတာ၊ deadline အမီပီးသွားတာလို့ မခေါ်သင့်ပါဘူး။ project code ကို refactoring မလုပ်ဘဲနဲ့ပီးသွားရင် နောက်လာမဲ့ new feature တွေကို ပီးမြောက်ဖို့ဆိုတာ ပိုပီး ခက်ခဲလာပါလိမ့်မယ်။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*x2kl_vtyA-R44pswxRcmqg.png" /><figcaption>တကယ်လို့ သင်သည် deadline နောက်ဆုံးရက်ကို ပြီးမြောက်ဖို့ bad code ကို ရေးပါက နောက်တစ်ခုက ပြီးမြောက်ရန် ပို၍ပင် ခက်ခဲမည်ကို သတိပြုပါ။</figcaption></figure><p>Why ဆိုတာကို သဘောပေါက်ပီးထင်တယ်။ ဘာကြောင့် သိသင့်လဲ နားလည်သွားရင် what and how ကို ဆက်သွားပါမယ်။ အဆုံးသတ် memeကတော့ :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aj-9WKFOD3BM5Jru-dZulA.png" /><figcaption>Here god will go…</figcaption></figure><h3><strong>So, What is it?</strong></h3><p>SOLID ဆိုတာဘာလဲ။ Five Object Oriented Design(OOD) principle ရဲ့ အတိုကောက်လို့ မှတ်နိုင်တယ်။ Robert C.Martin (Uncle Bob)က ရေးသားပြုစုခဲ့တာပါ။ Developer တိုင်းသိထားသင့်တဲ့ principle တစ်ခု ဘာလို့ဆို ဒီကောင်က coding နဲ့ maintainable လုပ်တဲ့ အချိန်မှာ အတော်လေးကောင်းပါတယ်။ ဒါပြင့် open source code က သူများ ဘာရေးထားလဲဆိုတာပါ ဖတ်နိုင်လာမယ် ။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jP45aShx74W2oxm3Lxan9Q.png" /><figcaption>solid principle</figcaption></figure><p>ဒီ principle ကနေ programmer တွေ cleaner code ဖြစ်အောင်၊ separating responsibilities, decreasing couplings, facilitating refactoring and code တွေ reusable ဖြစ်အောင် function တွေ data structure တွေကို class တစ်ခုအနေနဲ့ ဘယ်လိုစီမံရလဲ ဆိုတာကို သိနိုင်ပါတယ်။</p><p>SOLID ကနေပေးတဲ့ အရေးကြီးတာတွေက</p><ol><li>Make the code more understandable, clear and concise — code ကို သူများနားလည်လွယ်အောင်၊ တိကျမှုရှိအောင် လုပ်ရပါမယ်။</li><li>Make the code more flexible and tolerant to changes — code ကို ပြောင်းလွယ်၊ပြင်လွယ်အောင် လုပ်ရပါမယ်။</li><li>Increase the code adherence to OO principles — code က OO principles ကို လိုက်နာရမယ်။</li></ol><p>ဒီ article series ကို ဖတ်ပီးသွားရင် principle တစ်ခုစီရဲ့ theory ကိုနားလည်ပီး ကိုယ့်ရဲ့ coding skill ကို improve ဖြစ်လာမယ်လို့ မျှော်လင့်ပါတယ်။ Better programmer ဖြစ်ချင်ရင်တော့ practices များများလုပ်ဖို့လိုပါတယ်။ အသေးစိတ် implementation ကိုတော့ articles တစ်ခုချင်းဆီမှာ ဖော်ပြထားပါတယ်။</p><p><a href="https://medium.com/@yan_yan/single-responsibility-principle-what-is-srp-ad0cf85bb866">Single Responsibility Principle: What is SRP? Software Engineer လုပ်နေပီး ဒီ principle ကို သိလားမေးရင်… | by Yan Yan | Jul, 2022 | Medium</a></p><p><a href="https://medium.com/@yan_yan/open-closed-principle-make-your-code-cost-free-and-flexible-2bff62719d54">Open Closed Principle: Make your code cost-free and flexible | by Yan Yan | Jul, 2022 | Medium</a></p><p><a href="https://medium.com/@yan_yan/liskov-substitution-principle-improves-the-quality-of-your-code-1286e6257790">Liskov Substitution Principle: Improves the quality of your code | by Yan Yan | Jul, 2022 | Medium</a></p><p><a href="https://medium.com/@yan_yan/interface-segregation-principle-the-way-to-be-a-developer-1775db64e618">Interface Segregation Principle: The way to be a developer | by Yan Yan | Aug, 2022 | Medium</a></p><p><a href="https://medium.com/@yan_yan/dependency-inversion-principle-how-you-should-write-code-95d91fa3a69">Dependency Inversion Principle: How you should write code | by Yan Yan | Jul, 2022 | Medium</a></p><p><strong>Your Contribution</strong></p><ul><li>clap button ကို နှိပ်ပီး သိချင်တာရှိရင် comment section မှာ ချန်ထားခဲ့ပါ</li><li>ဒီ article ကို နှစ်သက်ရင် shar ပီး contribute လုပ်ပေးပါ</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eace92fc4d48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 essential step to make app in flutter]]></title>
            <link>https://medium.com/@yan_yan/7-essential-step-to-make-app-in-flutter-29e3fdcea0b6?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/29e3fdcea0b6</guid>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Fri, 24 Jun 2022 19:56:10 GMT</pubDate>
            <atom:updated>2022-06-24T21:38:09.379Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article I will discuss what things need to know and good to know for starting to make flutter project. This article is my opinion base on my experience during implementing flutter application. If I missed something, feel free for your contribution. Myanmar version below.</p><h3>Table of Contents</h3><ul><li>Dart</li><li>Widget</li><li>Navigation</li><li>State management</li><li>Networking</li><li>Storage</li><li>Store</li><li>Your contribution</li><li>Conclusion</li></ul><ol><li><strong>Dart</strong></li></ol><p>According to Flutter using dart language, you may need to know basic dart programming concepts . If you have an experience with some programming language eg. javascript, java, go, php — you can adopt this language easily. Because all of programming language concept are the same. You can learn quickly even you are fresher. Let me guide you, firstly try to understand what is data type, variable, list(there is no array in dart but array list), map(key-value data structure), future, async, await(Asynchronous programming) and stream (Reactive programming).</p><ul><li>data type, collection (need to know)</li><li>future, stream (good to know)</li></ul><p>2. <strong>Widget</strong></p><p>Do you know what flutter team say? — ‘ Everything is widget in Flutter wow!!’ When we run your project from IDE, UI will appear and we can see it. And then, every screen that you see is widget. In widget, we make text, button and other component — this is call stateless widget. Stateless widget is immutable and can build themself only once time so can’t change their-self. But Stateful widget can build themself and mutable .If you want to rebuild ,call the setState() function and then they will be re-render the state. Another widget is inherited widget that can share data between class as well as screen. But unfortunately we share data via constructure rather than using inherited widget. As I mentioned three widget are included in material and curpertino widget that build in flutter sdk. The topic points are</p><ul><li>stateless widget, stateful widget that include in material and curpertino widget(need to know)</li><li>what is mutable and immutable widget(good to know)</li></ul><p>3. <strong>Navigation</strong></p><p>According to UI/UX, we make many screens in our application and we need to move form one screen to other — It’s called Navigation. If you want to go then use Navigator.push(_) and want to get back Navigator.pop().When you want to go the screen with data — curry data form one screen to another you can do with router. How about other app to go to our app? Already have a solution I write this <a href="https://medium.com/@yly80103/open-your-flutter-app-from-external-link-using-uni-links-9abe64ac2a10">here </a>This is called deep link and powerful feature.</p><ul><li>push, pushName, pop …etc ( need to know)</li><li>deep link (nice to know)</li></ul><p>4. <strong>State management</strong></p><p>About state management in flutter — there is no final answer for what is the best state management. I think, even we make the whole conference to decide this topic is still will be no decision. In my experience just choose the one that you feel the most comfortable with. Before deep dive to state management make sure knowing — what is Ephemeral state and app state. This is basic block of state management. There are many state management solutations eg. getx, provider, bloc …etc. In <a href="https://pub.dev/">pub.dev</a> , the most popular is <a href="https://pub.dev/packages/get">getx</a> and easy to impletementation so we should try this one.</p><ul><li>getx state management — choose one that you feel comfortable with(need to know)</li><li>try other state management solution(good to know)</li></ul><p>5. <strong>Networking</strong></p><p>If you want to call your data form database or backend via api, you can do in this layer. You can call database connection form flutter( frontend ) but this way can attractive for hacker but we can keep it safety. Via backend is secure and more reliable. How we can get data from backend? Before using api( application programming interface) there was called XML. We can request api using dio package.</p><ul><li>http packet, dio package(need to know)</li></ul><p>6. <strong>Storage</strong></p><p>Also know as persistence or cookie for web. The purpose is to store user information eg. token, other credentials information in local. With this information, we can handle user have been login or not. If had login navigate to dashboard . For local storage , you can use share_perference, get_storage, flutter_secure_storage. For remote storage, Google firebase that include in flutter sdk and AWS.</p><ul><li>local storage ( need to know)</li><li>remote storage ( good to know)</li></ul><p>7. <strong>Upload play store and app store</strong></p><p>This step is release our final project. Before that we make a lot of changes, develop , testing again and again. All of the functions and modules finish in the testing then upload to the store. Before release to store you need to have store account and understand required information of each store. eg. keystore for play store , bundle ID for app store and term and conditions. If not they will reject. Another cool feature we can do in this state is CI/CD pipeline. This mean you can automate your deployment process with Github Action, Code magic — It’ve flutter integration and open-sourced.</p><p><strong>Your Contribution</strong></p><ul><li>press the clap button and leave a response to this article by providing the comment — to motivate me to write better.</li><li>Share this article</li></ul><p><strong>Conclusion</strong></p><p>In this article, We discuss the development process as well as deployment. I hope if you have understanded in each step, just make a portfolio to get a job because you’e already verify that required knowledge in production. The topic is guide by ko nyi. Thank for reading until the end.</p><p><strong>Myanmar version</strong></p><p>ဒီဆောင်းပါးမှာ flutter project စတင်ဖို့‌ရေးအတွက် သိထားသင့်တဲ့အချက်တွေကို ဆွေးနွေးသွားပါမယ်။ ဤဆောင်းပါးသည် flutter application ကို အကောင်အထည် ဖော်ရာမှာ အတွေ့အကြုံအပေါ် အခြေခံ၍ ကျွန်ုပ်၏ထင်မြင်ယူဆချက်သာဖြစ်သည်။ တစ်စုံတစ်ရာ ကျန်နေခဲ့သည်ရှိသော် သင်၏ ကူညီမှုအတွက် အသိအမှတ်ပြုပါရစေ</p><h3>Table of Contents</h3><ul><li>Dart</li><li>Widget</li><li>Navigation</li><li>State management</li><li>Networking</li><li>Storage</li><li>Store</li><li>Your contribution</li><li>Conclusion</li></ul><ol><li><strong>Dart</strong></li></ol><p>Flutter သည် dart language ကို အသုံးပြုထားသည့် အတွက်၊ dart programming ရဲ့သဘောတရားများကို သိရှိရန် လိုအပ်ပါသည်။ အချို့ သောprogramming language နှင့် eg. javascript၊ java၊ go၊ php — အတွေ့အကြုံရှိလျှင် ဤ programming ကို အလွယ်တကူ နားလည်နိုင်ပါသည်။ programming language တွေရဲ့ concept က အတူတူပါပဲ။ အတွေ့အကြုံ မရှိသေးရင်တောင်မှ မြန်မြန်ဆန်ဆန် သင်ယူနိုင်ပါတယ်။ data type ‌ဖြစ်တဲ့ variable တွေ၊ list (dart တွင် array မပါရှိသော်ကြောင့် array list )၊ map(key-value data structure)၊ future၊ async၊ await (Asynchronous programming) နှင့် Stream ( Reactive programming) သိရန်လိုအပ်သည်။</p><ul><li>data type, collection(သိရန်လိုသည်)၊</li><li>future , stream (သိရင်ကောင်းသည်)၊</li></ul><p>2. <strong>Widget</strong></p><p>flutter teamက ဘာပြောလဲ ဆိုတေ့ာ— ‘everyting is widget in Flutter wow!!’ သင့် project ကို IDE မှ build ရင်၊ UI ပေါ်လာပြီး ၎င်းUI မျက်နှာပြင်တိုင်းသည် widget ဖြစ်သည်။ widget မှာ၊ ကျွန်ုပ်တို့ text ၊button နှင့် အခြားအစိတ်အပိုင်း တွေကို—stateless widget ဟုခေါ်သည်။ stateless widgetသည် immutableဖြစ်ပြီး တစ်ကြိမ်တည်းသာ တည်ဆောက်နိုင်သောကြောင့် ပြောင်းလဲ၍မရပါ။ သို့သော် Stateful widget သည် state ကို အ‌ခြေခံ တည်‌ဆောက်ထား‌သောကြော် ပြောင်းလဲနိုင်သည်။ အကယ်၍ state ကို ပြန်လည်တည်ဆောက်လိုပါက setState() ကို ခေါ်ပြီးနောက် rebuild ပြန်လုပ်နိုင်ပါသည်။ class နှင့် screen တွေကြားတွင် data ပေးပို့နိုင်သည့် widget သည် inherited widget ဖြစ်သည်။ အထက်ပါ widget သုံးခုကို material နှင့် curpertino widget တွင် တွေ့ နိုင်သည်။</p><ul><li>stateful widget၊ stateful widget(သိရန်လိုသည်)၊</li><li>mutable and immutable widget (သိရင်ကောင်းသည်)၊</li></ul><p>3. <strong>Navigation</strong></p><p>UI/UX အရ၊ ကျွန်ုပ်တို့၏ application တွင် screen များစွာကို ပြုလုပ်ထားပြီး တစ်ခုမှတစ်ခုသို့ သွားရန် လိုအပ်သည် — ၎င်းကို Navigation ဟုခေါ်သည်။ သွားလိုပါက Navigator.push(_) ကိုသုံး၍ Navigator.pop()ကို ပြန်ထွက်လိုလျှင် ခေါ်သည်။ အခြားအက်ပ်ကနေ ကျွန်ုပ်တို့၏ application ကိုသွားလိုလျှင် deep link feature ကိုသုံးပီး သွားလို့ရတယ်။</p><ul><li>push၊ pushName၊ pop …etc (သိရန်လိုသည်)</li><li>deep link (သိရင်ကောင်းသည်)၊</li></ul><p>4. <strong>State management</strong></p><p>to be continue….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29e3fdcea0b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open your flutter app from external link using uni_links]]></title>
            <link>https://medium.com/@yan_yan/open-your-flutter-app-from-external-link-using-uni-links-9abe64ac2a10?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/9abe64ac2a10</guid>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Wed, 22 Jun 2022 05:26:46 GMT</pubDate>
            <atom:updated>2022-06-22T05:27:54.656Z</atom:updated>
            <content:encoded><![CDATA[<p>အခုခေါင်းစဥ်အနေနဲ့ ကိုယ့်ရဲ့ application ကို deep link ရဲ့ feature သုံးပီး link ကနေ ဖွင့်နိုင်အောင်လုပ်သွားပါမယ်။ အခု tutorial မှာတော့ <a href="https://pub.dev/packages/uni_links">uni_links </a>ဆိုတဲ့ package ကို သုံးပီး ပြုလုပ်သွားပါမယ်။ဒီ packet က deep link ကိုအခြေခံပီး ပြုလုပ်ထားတာကြောင့် host website တွေမလိုအပ်ဘဲ ကိုယ်သွားစေချင်တဲ့ app ကို ဖွင့်ပေးနိုင်ပါတယ်။ In app host ပုံစံမျိုး ကိုယ်ရဲ့ host name ကို သတ်မှတ်ပေးလိုက်ရင် ရပါတယ်။ဒါပေမဲ့ application ကိုတော့ အရင် install လုပ်ဖို့ လိုအပ်ပါမယ်။ <a href="https://pub.dev/packages/uni_links">unit_links </a>ကနေလည်း အသေးစိတ် ၀င်ကြည်လို့ရပါတယ်။ final output ကိုကြည့်ရအောင်</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F722824581%3Fh%3D97faee65ff%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F722824581&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1455590736-a10e027abd1141f726205a200b7f218d21b77f5200556cc412caf0323598e52f-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1280" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/b491b3d9f53744caf02221a5da444c5b/href">https://medium.com/media/b491b3d9f53744caf02221a5da444c5b/href</a></iframe><p>စရေးလိုက်ကြရအောင်။ <br>1.<strong>Dependency</strong></p><p>အရင်ဦးဆုံး dependency ကိုထည့်ရပါမယ်။</p><pre>flutter pub add uni_links</pre><p>2.<strong>define a unique scheme and host name.</strong><br> ကိုယ့်ရဲ့ scheme and host name ကို uniqueဖြစ်အောင်သတ်မှတ်ထားပါ။<br>eg.</p><p>Scheme name of: https<br> And a host name of: deeplinkstesting.com<br> <br>3. <strong>Configure Android</strong><br> Android configuration လုပ်ဖို့ AndroidManifest.xml ကိုသွားပါ။<br> — android &gt; app &gt; src &gt; main &gt; AndroidManifest.xml<br> — Deep Links ရဲ့ scheme and host name ကို အောက်ပါတိုင်း ထည့်လိုက်ပါ။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4bdb175346280afce652873b099d519b/href">https://medium.com/media/4bdb175346280afce652873b099d519b/href</a></iframe><p>4. <strong>Configure iOS</strong><br> IOS configuration လုပ်ဖို့ Info.plist ကိုသွားပါ။<br> — ios &gt; Runner (or your app name) &gt; Info.plist<br> — Deep Links ရဲ့ scheme and host name ကို အောက်ပါတိုင်း ထည့်လိုက်ပါ။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/519fbac582b4ad18576b9c3619c98bee/href">https://medium.com/media/519fbac582b4ad18576b9c3619c98bee/href</a></iframe><p>5. <strong>Handle in main.dart</strong></p><p>Deep link ကို handle လုပ်ဖို့ နည်းလမ်းနှစ်မျိုးရှိပါတယ်။</p><ol><li>Cold start : application ကို မဖွင့်ထားဘဲ(is not running in background) deep link သုံးပီးစဖွင့်မယ်ဆိုရင် _initURIHandler function နဲ့ စပီး triger ဖြစ်ပီး initial link ကို ရပါမယ်။</li><li>Coming back to the foreground : application က backgroundမှာ runနေရင် Stream ကနေ initial link ကို <br> ရပါမယ်။<br>ဒီနေရာမှာ _initURIHandler ကို app lifecycle မှာ တစ်ခါဘဲ run ရပါမယ်။ဒါကို handle လုပ်ဖို့ _initialURILinkHandled ကို global variableသတ်မှတ်ပီး ထိန်းထားပါမယ်။</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9131c73f4bdbe8902c97e99d878fe66d/href">https://medium.com/media/9131c73f4bdbe8902c97e99d878fe66d/href</a></iframe><p>နောက်တစ်ဆင့်</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9d949017ec359de61f0a010e0f13eae/href">https://medium.com/media/f9d949017ec359de61f0a010e0f13eae/href</a></iframe><p>ရှင်းလင်းချက်</p><p>Uri နှစ်ခုက ၀င်လာတဲ့ host link က initial လား current လား ဆိုတာ သတ်မှတ်ပီး လုပ်ဆောင်ပေးဖို့ပါ<br>_err က Uri error တတ်ရင် handling လုပ်ဖို့ နဲ့<br>_streamSubscription က၀င်လာတဲ့ link က app ဖွင့်ထားချိန်မှာဆိုရင် handle လုပ်ဖို့ဘဲဖြစ်ပါတယ်</p><p>နောက်တစ်ဆင့် _initURIHandler method ကို create လုပ်မယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e59c13d5da3e9e4be479907b6e8c199d/href">https://medium.com/media/e59c13d5da3e9e4be479907b6e8c199d/href</a></iframe><p>ရှင်းလင်းချက်</p><p>- _initialURILinkHandled ကို တစ်ခါဘဲ run အောင် true ပေး<br>- _initialURILinkHandled runရင် fluttertoast ပြ<br>- getInitialUri ကနေ ပြန်လာတဲ့ call back ကို initialUri ထဲထည့်<br>- null မဟုတ်ရင် initialUri ကို setup လုပ်<br>- PlatformException error တတ်ရင် handle လုပ်</p><p>နောက် _incomingLinkHandler create လုပ်မယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1bbb052a8e55b0f9efde8030c514d7b0/href">https://medium.com/media/1bbb052a8e55b0f9efde8030c514d7b0/href</a></iframe><p>ရှင်းလင်းချက်<br>- web platform ဆိုရင် initialUri ဘဲ handle လုပ်မယ်<br>- uriLinkStream ကိုlisten လုပ်ပီး ၀င်လာတဲ့ link ကို currentUri ထည့်ပီး<br>- error တတ်ရင် handle လုပ်</p><p>လိုအပ်တဲ logic impelement လုပ်ပီးရင် initiState ကနေ ခေါ်ပါမယ်။</p><p>stream ကို dispose() လုပ်ပေးရပါမယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8db42fe70972f5cf021d4549377301ba/href">https://medium.com/media/8db42fe70972f5cf021d4549377301ba/href</a></iframe><p>build method ကိုကြည့်ရအောင်</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/59ba87ce032cc289c3190ba5dfee8cf0/href">https://medium.com/media/59ba87ce032cc289c3190ba5dfee8cf0/href</a></iframe><p>ရှင်းလင်းချက်</p><p>(1) getInitialUri ကနေ၀င်လာတဲ့ linkကို _initialURI ထဲသိမ်းပီး ListTile နဲ့ပြမယ်<br>(2) stream ကနေ ၀င်လာတဲ့ current link ကို mobile only ဘဲပြပါမယ်။<br>(3) errorတတ်ရင်ပြပါမယ်။</p><p>application ကို build and restart လုပ်ပါမယ်။<br>ဒီလိုပေါ်လာပါလိမ့်မယ်။ List Tile ရဲ့ subtitle တေွကnull ဖြစ်နေပါလိမ့်မယ်။နောက်တစ်ဆင့်ကြရင် testing လုပ်ပါမယ်။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*bC9oo6GDxFOYeIF9zMPC-w.png" /></figure><p>6.<strong>Testing your deep links</strong></p><p><strong>Android</strong></p><ul><li>app ထဲ register လုပ်ထားတဲ့ deep link ကို CLI tool ကို သံုးပီးစမ်းပြပါမယ်။ tool ကို install မလုပ်ထားရင် <br> Android studio ရဲ့ setting ထဲ့သွားပီး SDK platform-tools ကို install လုပ်ရပါမယ်။Emulater နဲ့ကြည့် ရအောင် terminal ကနေ အောက်ပါ commond ကို run ကြည့်ပါ</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3ab48307994c13500364bb8987c1e68/href">https://medium.com/media/f3ab48307994c13500364bb8987c1e68/href</a></iframe><p><strong>IOS</strong></p><p>Xcode ကို install လုပ်ပီးရင် အောက်ပါcommand ကိုစမ်းကြည့်ပါ။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bbab6e9579bbbb1eb8203062b4f5606/href">https://medium.com/media/0bbab6e9579bbbb1eb8203062b4f5606/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F722824050%3Fh%3D0096b76a14%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F722824050&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1455589826-bb8515c87c9540fb178c804a89c7208114f5becacb3c109a5bfcd826adc1f6f5-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1280" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/127fb2b6146526a1dd35d93dddfe8cae/href">https://medium.com/media/127fb2b6146526a1dd35d93dddfe8cae/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F722824581%3Fh%3D97faee65ff%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F722824581&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1455590736-a10e027abd1141f726205a200b7f218d21b77f5200556cc412caf0323598e52f-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1280" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/b491b3d9f53744caf02221a5da444c5b/href">https://medium.com/media/b491b3d9f53744caf02221a5da444c5b/href</a></iframe><p>project source code ကို အောက်က link ကနေကြည့်လို့ရပါတယ်။</p><p><a href="https://github.com/YanYanUcstt/uni_link_example.git">GitHub - YanYanUcstt/uni_link_example: Open flutter application from external link</a></p><p><strong>Conclusion</strong></p><p>ဒီ tutorial မှာ application ကို external ကနေ ဖွင့်ဖို့ စမ်းပြထားတာဖြစ်တယ်။နောက်တစ်ခုက Firebase dynamic link နဲ့လည်း ဖွင့်လို့ရတယ်။သူက application ကို ဖင့်ဖို့ install မလုပ်ထားခဲ့ရင်တောင် install လုပ်ဖို့ playstore ကို redirect လုပ်ခိုင်းလို့ရတယ်။အဆုံးထိ ဖတ်ပေးလို့ကျေးဇူးပါ။ <a href="https://blog.logrocket.com/understanding-deep-linking-flutter-uni-links/">source</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9abe64ac2a10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter build with Github Action]]></title>
            <link>https://medium.com/@yan_yan/flutter-build-with-github-action-3b6a1a9a6a87?source=rss-66a9a1e4f526------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b6a1a9a6a87</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Yan Yan Chan]]></dc:creator>
            <pubDate>Mon, 20 Jun 2022 21:38:47 GMT</pubDate>
            <atom:updated>2022-06-26T11:59:14.931Z</atom:updated>
            <content:encoded><![CDATA[<p>အခုရေးမဲ့ အကြောင်းအရာကတော့ flutter apk ထုတ်တာကို Github Action အသုံးပြုပီး ထုတ်ပြသွားပါမယ်။လုပ်ငန်းစဥ်တွေကတော့ command line ကနေ apk ထုတ်တဲ့လုပ်ရိုးလုပ်စဥ်နဲ့ သိပ်မကွာပါဘူး။</p><p><a href="https://docs.github.com/en/actions">GitHub Action</a> က ကျွန်တော်တို့ code သိမ်းထားတဲ့နေရာမှာဘဲ အလိုအလျောက် release ထုတ်ဖို့ ကူညီပေးပါတယ်။အခြား CI/CD လုပ်နိုင်တဲ့ Code Magic, Travis or CircleCI စသည်တို့လည်း ရှိပါတယ်။</p><p><a href="https://docs.flutter.dev/">Flutter </a>က ယခုချိန်မှာ popular အဖြစ်ဆုံး cross platform framework တစ်ခုဖြစ်ပီးCode baseတစ်ခုတည်းကနေ mobile,web,desktopကို compile လုပ်နိုင်ပါတယ်။</p><p>ဆိုတော့ GitHub Action ဘယ်လိုလုပ်ရမှလဲ။အောက်က step by step ရှင်းပြသွားပါမယ်။</p><p>အရင်ဆုံး .github/workflows/main.yml ဆိုပီး .github folder ကို createလုပ် ပီးရင်workflows folder ကိုcreate ထပ်လုပ်။နောက်ဆုံး .yml file ကို create လုပ်ပါမယ်။.yml fileက github action လုပ်ဖို့ လိုအပ်တဲ့ configuration တေွကို လုပ်ဆောင်ဖို့အတွက်ဖြစ်တယ်။</p><p><strong>#on</strong><br>Github Action စလုပ်မဲ့နေရာဖြစ်ပါတယ်။အောက်မှာပြထားတာကတော့ master branch ကို push လုပ်ပီး run မှာဖြစ်ပါတယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/107780402ce5697fa23dea19da9f1ef2/href">https://medium.com/media/107780402ce5697fa23dea19da9f1ef2/href</a></iframe><p><strong>#jobs</strong><br>ဘယ်အလုပ်တွေ(workflows) လုပ်ရမလဲဆိုတာကို သတ်မှတ်ပါတယ်။jobs တေွကတော့ အများကြီး ရှိနိုင်ပါတယ်။ အခုကတော့ တစ်ုဘဲလိုအပ်ပါတယ်။</p><p><strong>#runs-on</strong><br>ဘယ် virtual machine ပေါ်မှာ run ရမလဲဆိုတာကို သတ်မှတ်ရပါမယ်။အခုတော့ macos-lastestကို အသံုးပြုထားပါတယ်။ window, macos and linux စတဲ့ VM တေွ့ကို အသုံးပြုနိုင်ပါတယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e94796f8ae861cddda59f758afda4d26/href">https://medium.com/media/e94796f8ae861cddda59f758afda4d26/href</a></iframe><p><strong>#steps</strong><br>steps မှာတော့ လုပ်ဆောင်မဲ့ အဆင့်တိုင်းရဲ့ အသေးစိတ်ကို သတ်မှတ်ပေးရပါမယ်။ကြည့်ရအောင်</p><p>1. Android ကိုbuild လုပ်ဖို့ Environment အတွက် လိုအပ်တဲ့ java version ကို ထည့်ပေးရပါမယ်။ Flutter Environment အတွက်လည်းသတ်မှတ်ရပါမယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e89745fe8248cc8eea1e7117c3d08464/href">https://medium.com/media/e89745fe8248cc8eea1e7117c3d08464/href</a></iframe><p>2. flutter pub get အရင် run ပီး လိုအပ်နေတဲ့ dependencies တေွကို အရင်ေခါ်မယ်။</p><pre>run: flutter pub get</pre><p>3. test case တေွမှန် မမှန် စစ်ရပါမယ်။Test case တွေမရေးထားရင် command ပိတ်ထားလိုက်ပါ။</p><pre>run: flutter test</pre><p>4. apk ထုတ်ပါမယ်။</p><pre>run: flutter build apk — release — split -per -abi</pre><p>5. ios အတွက် ထုတ်ပါမယ်။</p><pre>- run: |          <br>     flutter build ios --no-codesign<br>     cd build/ios/iphoneos<br>     mkdir Payloadcd Payload<br>     ln -s ../Runner.app<br>     cd ..<br>     zip -r app.ipa Payload</pre><p>6. release ထုတ်ထားတဲ့ file တွေကို artifects ပေါ်တင်မယ်။ version tap တွေက 1.0.0,1.0.1.. စသည်ဖြငိ့ build လိုက်တိုင်း တိုးသွားပါလိမ့်မယ်။</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6be32521c9398f96233d4ede6ce0978/href">https://medium.com/media/f6be32521c9398f96233d4ede6ce0978/href</a></iframe><p>7. နောက်ဆုံး .yml file အပြည့်အစုံကတော့</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b164ecfc5c254106d30564899fc93b1d/href">https://medium.com/media/b164ecfc5c254106d30564899fc93b1d/href</a></iframe><p>configuration လုပ်ပီးသွားပီးဆိုတော့ GitHub ပေါ် push လုပ်လို့ရပါပီး။<br>ကိုယ်တင်လိုက်တဲ့ repository ရဲ့ Action tap မှာ build လုပ်နေတာ မြင်ရပါလိမ့်မယ်။</p><p>နိပ်လိုက်ရင် တစ်ဆင့်ချင်းဆီ လုပ်နေတာ မြင်ရပါလိမ့်မယ်။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_J7ibNaR4YjpDY-zpgNOaw.jpeg" /></figure><p>Yayyy! အောင်မြင်သွားပါပီး။</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrGAjS-H8I8Hga1W0-VEIg.jpeg" /></figure><p>apk ကိုလည်းအောက်က ပြထားတဲ့အတိုင်း သွားယူလို့ရပါပီး</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhzgbldtepjAAfG-5nJ6NA.jpeg" /></figure><p>Project source code ကိုအောက်က link ကနေကြည့်လို့ပါပီး</p><p><a href="https://github.com/YanYanUcstt/github_action_example.git">GitHub - YanYanUcstt/github_action_example</a></p><p><strong>Conclusion</strong></p><p>GitHub Action သုံးပီး automated things(CI) လုပ်ပြသွားတာဘဲဖြစ်ပါတယ်။အဆုံးထိဖတ်ပေးလို့ ကျေးဇူးပါ။ <a href="https://medium.com/mobile-development-group/github-actions-for-flutter-cf02923d7b5d">Source..</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b6a1a9a6a87" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>