Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

내가 안드로이드 개발자가 되었을 때 아무도 알려주지 않은 것들(+MVP / MVVM ...

내가 안드로이드 개발자가 되었을 때 아무도 알려주지 않은 것들(+MVP / MVVM 이야기) - DroidKnight 2018

Sa-ryong Kang

April 21, 2018
Tweet

More Decks by Sa-ryong Kang

Other Decks in Programming

Transcript

  1. Who is this guy? • ҃۱ 18֙ର SW ূ૑פয (ݽ߄ੌ,

    ߔূ٘, ਢ ೐ۿ౟ূ٘ ׮ ೧ࠆ) • ತস ੹ޙо: ޷Ҵীࢲ ೠ ߣ, ೠҴীࢲ ف ߣ झఋ౟স ೮׮ ݈ইݡ਺ • ੌࠄ झఋ౟সীࢲ ݽ߄ੌ ׸׼ ইఃఫ౟۽ Ӕޖ ઺ • ӝ۞ӝ ইࡅ: ೠҴী ইղ৬ ف ইٜҗ ъই૑৬ Ҋন੉ܳ فҊ ੓਺ • ӓೠ ѐߊ: അ੤ 6ѐ Android / iOS জ੄ ܻ׏঴ਸ ׸׼઺
  2. • ࢸ݀ೠ૑ 4.5֙ ػ झఋ౟স • ੌࠄ ୭؀੄ ਭই ੿ࠁ

    ࢲ࠺झ ࠁਬ • but ت਷ ਬ஖ਗ Үࢎ ೻٘೴౴ ࢲ࠺झ۽.. • ৻ࠗ ై੗ ੹ഃ হ੉ ࣽ੉੊੄ ੤ై੗݅ਵ۽ Ҋࣘ ࢿ੢઺ • ী࠺झ(ੌࠄ੄ о۽ࣻӡ?)੄ Ӕࢎೠ 9க ࠽٬ਸ ా૩۽ ॹ • Business-aware Engineerٜী ੄೧ ਑૒੉ח ഥࢎ • ঠӔ Ә૑ / ോੌ Ӕޖ Ә૑
  3. द੘ೞӝ ੹ী... • ݽٚ ղਊਸ ೠ ߣী ੉೧ೞ૑ ޅೞ࣊ب ҡଳणפ׮

    • о߶਍ ӝ࠙ਵ۽ ٮۄয়दݶ ؾפ׮ • ೒ۖಬ ઺݀੸: ࢚׼ࣻ ղਊ਷ iOSীب Ӓ؀۽ ੸ਊ оמ೤פ׮ • ࠂण оמ: ठۄ੉٘ ੹୓ ղਊ਷ ইې ݂௼ীࢲ ׮਍ ߉ਵप ࣻ ੓णפ׮ • https://speakerdeck.com/saryong/mvvm-iyagi-droidknight-2018
  4. উ٘۽੉٘ য೒ ખ ٜ݅য ࠊ. ֎?! औѱ ೡ ࣻ ੓ਗ਼ই.

    Dilbert © 2018, Andrews McMeel Syndication
  5. ୡࠁ ݽ߄ੌ ѐߊ੗੄ Ҋҵ࠙ై • Device/version fragmentation: пয়ח ೮঻૑݅, ޖ঺ਸ

    ࢚࢚ೞٚ উ٘۽੉٘ח ৘ӝ஖ ޅೠ Ҕীࢲ ٍాࣻܳ ஘׮. • ੉ લੌ ֈ੄ ࠺زӝ: оՔঀ਷ ࢤп೮؍ Ѫҗ ੹ഃ ׮ܲ ߑೱਵ۽ ۽૒੉ प೯ػ׮. ӒѪب ೦࢚ ੤അغח Ѫب ইפ׮. • ঌ׮оب ݽܳ Life Cycle ޙઁ: যڃ ҃਋ח ౠ੿ Fragmentо द੘ೞח द੼ਸ ੟ইղӝ ࠛоמ೧ࠁ੉ח ҃਋о ੓׮. ೞ೙ ઁੌ ઺ਃೠ ചݶীࢲ.. • ҳӖ੉ ޥо ࢜۽਍ Ѧ ղ֬ਸ ٸ݃׮ ੉ઁח ૞ૐࠗఠ դ׮. ੓ח Ѫࠗఠ ઁ؀۽ ખ جইоѱ ٜ݅ۄҊ!!
 ଵҊ: Fxxx you Android Framework https://medium.com/@drinfo/fuck-you- android-framework-ddbb02c4ae48
  6. ૌѢ਍ ۨ߰স ࢤഝ • ৔য ੗ܐ۽ ׀ਸ جܻݶ ੄৻۽ ஘੺ೞҊ

    ੗ࣁೠ ੿ࠁٜ੉ ݆׮. झఖয়ߡ೒۽, ݆ࣻ਷ ౚషܻ঴ٜ.. • যଧযଧ ೞ׮ࠁפ ֢ೞ਋ب ࢤ҂׮ • উ٘۽੉٘ ߡ੹߹ ؀୊ߨ, ۄ੉೐ࢎ੉௿ ؀਽, ա݅੄ ٣ߡӒ ֢ೞ਋, ߑয੸ ௏٬, ... • Kotlin - ࠺Ү੸ ੸਷ ֢۱ਵ۽ ࢜۽਍ ঱যܳ ߓਕ ௏٬ೞח ੤޷ب ॕॕ
  7. ҍ ׮оয়ח ठۢ೐ • ੉੹җ э਷ ࣘب۽ח प۱੉ ט૑ ঋח׮

    • ੋఠ֔ী ୡә ੉࢚ ࣻળ੄ ੗ܐח Ѣ੄ হ׮ • ҡଳ਷ ੗ܐܳ ଺ও׮ रਵݶ ցޖ য۰ਕ Ѣ੄ ࢶޙ׹ ࣻળ.. ؀ױೠ Ѥ ঌѷח ؘ ؀୓ ޤۄח ૑ ݽܰѷ׮. • ޖ঺ࠁ׮ ઱߸ী ޛযࠅ ࢎۈ੉ হ׮. ղо ੜ ೞҊ ੓ח૑ ঌ ӡ੉ হ׮
  8. ղо উ٘۽੉٘ ѐߊ੗о غ঻ਸ ٸ 
 ইޖب ঌ۰઱૑ ঋও؍ Ѫٜ:


    ־ҵо ৖ীࢲ ஘੺ೞѱ ঌ۰઱ݶ 
 ଵ જওਸ Ѫ э਷ ૕ޙٜ੉ ੓׮.
  9. Clean Architecture - 
 ѐߊ੗੄ ҳਗ੗ੋо, ࢤࢎۈ ੟ח ࢚ࣿੋо? •

    ইפ.. ೞۄח ѱ ৵ ੉ۧѱ ݆ই?! • ׮ٜ ઺ਃೞ׮Ҋٜ਷ ೞחؘ.. ઁ؀۽ ॳח ࢎۈ਷ ߹۽ উ ࠁੋ׮. • زӒۆ җ֘ Ӓܿ ݈Ҋ ೧઴ ফӝח হפ?
  10. MVVM, ԙ ೧ࠁҊ रणפ׮! • Ӕؘ যଧ೧ঠೡ ઴ ݽܰѷ׮. •

    ॳݶ ଵ જ׮חؘ.. ցޖ ࠂ੟ೞ׮. • ৘ઁٜ਷ ݆਷ؘ, ׮ٜ ઁпп੉׮. ޖट ইఃఫ୊о ੉ۧѱ ੿೧૓ ѱ হয?
  11. MVP.. ઁ؀۽ ॄࠁҊ र׮. • ੌױ MVVMࠁ׮ח ए਍ Ѫ э׮.

    • ୊਺ীח જ਷ Ѫ эওחؘ.. 
 ೐۽ં౟ܳ ૓೯ೞ׮ࠁפ ژ ׮ܲ ஶ౟܀۞ܳ ٜ݅Ҋ ੓ח Ѫ э਷ ӝ࠙਷ ৵ੌ ө..
  12. RxJava: somebody help! • য۵׮! ഁтܽ׮! ־ҵо ખ ب৬઻!! •

    ੗ݒಿ LiveDataח ખ ए਍ Ѫ э਷ؘ ӒѪ݅ ыҊח গݒೠ ٠ب..
  13. How the fxxx can I inject dependency? • ੄ઓࢿ ઱ੑ..

    ୊਺ূ ए਍ Ѫ эওחؘ.. • ՘হח decision making੄ োࣘ - оݶ т ࣻ۾ ౠ੿ ੋझఢझী ؀ೠ injectionਸ যڌѱ ೧ঠ ബҗ੸ੋ Ѥ૑ ցޖ ഁтܽ׮.
  14. Test-Driven Developement: 
 ೞݶ જ׮חؘ.. ଵ જ׮חؘ.. • Ӓ ݆Ҋ

    ݆਷ ਬ׫ పझ౟ ౚషܻ঴ٜ ઺ীࢲ पઁ ࢚ਊ ೐۽ં౟ ࣻળ੄ ਬ׫ పझ౟ܳ ݅٘ח ߨਸ ঌ۰઱ח Ѥ ೞաب হ׮. • જ׮ח Ѣ ׮ ࡤੋѢ ইջ?
  15. ઱ചੑ݃ী ࡅ૓ दפয ѐߊ੗੄ ੹ഋ੸ ૐ࢚ • ࠺ҙ઱੄: ই, ӒѢ?

    ࢜۽਎ Ѫب হח Ӓր ਬ೯੉ঠ.. Ӓ۠ Ѣ হযب ੉ઁө૑ ੜ ѐߊ೧৳׮Ҋ. • ౹یӈ ૐറҵ: ޤ ࢜۽਍ ѱ ա৳׮Ҋ? য়ט ׼੢ ੸ਊ೧ࠁ੗. • ో ݅מ઱੄: ॶ ઴ ইח ో, ঌҊ ੓ח ۄ੉࠳۞ܻ੄ ं੗о ҍ प۱੉׮? • Low-hanging fruit: ए਍ ޙઁী݅ ૘଱ೞӝ
  16. 1. Solution Provider • ঌҊ્ܻী ؀ೠ Ө਷ ੉೧: ׮ܲ ࢎۈ੉ۄݶ

    ҳഅೞ૑ ޅೡ Ѫ э਷ Ѫਸ, ׮ܲ ࢎۈࠁ׮ ف ߓח ࡅܰѢա ੘਷ ࢎ੉ૉ۽ ز੘ೞѱ ٜ݅ ࣻ ੓ח ࢎۈ • Kotlin ژח Java ঱য੄ semantics੄ Ө਷ ਗܻ৬ ঱য ࢸ҅ ୍೟ী ؀ೠ ੉೧ • Dalvik੄ ز੘ ਗܻী ؀ೠ ੉೧ • Activity / Fragment੄ ઺ਃೠ ز੘ਸ ೒ۖಬ ௏٘ ۨ߰ীࢲ੄ ੉೧ • উ٘۽੉٘о ചݶਸ ۪؊݂ ೞח ݒழפ્੄ ੉೧ • …
  17. 2. Architect • ղ ೐۽ં౟ܳ, рױೠ README.md ౵ੌ ৻ী ইޖ

    ࢸݺ হ੉ب ׮ܲ ѐߊ੗ ীѱ ੋࣻੋ҅ೡ ࣻ ੓׮ • ղ ௏٘ܳ 1֙ ٍী ׮द ࠌਸ ٸ ҍ߄۽ ੉೧ೡ ࣻ ੓׮ • ௾ ӏݽ੄ ҳઑ ࣻ੿ب 1~2ੌ ղী ೧յ ࣻ ੓ਸ ੿ب۽ ਬোೞѱ ҳઑܳ ݅ٚ׮ • Jr ূ૑פযীѱ റࣘ ௏٬ਸ উबೞҊ ކٶ ځֈѹب ؼ ࣻળਵ۽ ӝࠄ ҳઑо ѼҊೞѱ ੘ࢿೠ׮. ޖ঺ࠁ׮.. ੜޅػ ߑधਵ۽ ҳഅೞӝо ݒ਋ য۵ب۾ ҳઑ ܳ ٜ݅ ઴ উ׮
  18. द੘੉ ߈ • ࠺ҙ઱੄ܳ ߡܻҊ ੌױ ࠗ٭ഃ ࠁࣁਃ! • ೧ࠁ૑

    ঋਵݶ ੉೧ೞӝ য۰਍ ѐ֛੉ ݆਺ • द੘਷ ੄৻۽ ए਑: Ѣ੄ ݽٚ ࠙ঠীࢲ ੑޙਊ ౚషܻ঴ਸ औѱ ଺ਵप ࣻ ੓ ਺
  19. –George Bernard Shaw “ف ࢎۈ੉ п੗ ыҊ ੓ח ࢎҗ ೞաܳ

    Үജೠ׮ݶ 
 ৈ੹൤ ೞաঀ੄ ࢎҗ݅ ыҊ ੓ਸ Ѫ੉׮. ೞ૑݅ ই੉٣যܳ Үജೞݶ п੗ ف ѐঀਸ ыѱ ػ׮.”
  20. ҕਬ੄ ൨ • ֢ೞ਋ٚ Ҋ޹੉ٚ ݈ೡ Ѣܻо ࢤ҂׮ݶ, ׼न੄ ૑धਸ

    Բળ൤ ҕਬೞࣁਃ. • ࠺तೠ ҙबࢎ੄ ূ૑פযٜਸ Բળ൤ ݅աࠁࣁਃ. • ࠶۽Ӓח যڄөਃ? • ઱੄: झ௼ܽࢫਵ۽ بߓೞח tutorial, ױࣽ ࢸ஖ߨب જ૑݅.. ӝ৴੉ݶ ੗न੄ ࢤп੉ ٜযр Ӗ੉ झझ۽ীѱب ة੗ীѱب ؊ ب਑੉ ؾפ׮.
  21. ੌࠄ੄ ҃਋ • ࠶۽Ӓܳ ాೠ ҕਬо ੌ࢚ച: Qiita, Hatena Blog

    • ҕࠗഥ: ઱۽ ૑৉ ױਤ੄ ࣁ޷ա. eg. Sibuya.apk, Akiba.swift, ... • Moku-moku meeting: Ӓր п੗ ௏٬ ݽ੐
 1.5 ~ 2दр ѐ߹ ੘স റ যڃ ੘সਸ ೮ח ૑ ੗ی/Ҋ޹/ઑ঱ ա׃ • Network Party
 ੗ӝо ҳഅೠ ইఃఫ୊, పझ౟ ١ ҳ୓੸ੋ ࠗ࠙ী ؀೧ࢲ ૑धਸ Үജೞח ݽ੐
  22. ழ߁२ • ޷٣ষ ࠶۽Ӓ
 https://medium.com/@justfaceit • 5ਘ 5ੌ ҕѐؾפ׮. •

    ݽ߄ੌীࢲ੄ TDD, MVVM, DDD, DI ١ী ؀೧ࢲ प૕੸ੋ ղਊਸ ҕਬೞҊ ੗ ೤פ׮.
  23. MVC is not evil • Modelҗ Viewח ੌઙ੄ ۨҊ ࠶۟:

    Model(+ Domain) ҅கীࢲח ࠺ૉפझ ۽૒ਸ, View ח UI۽૒ਸ ઁҕ. • Controllerח ۨҊ ࠶۟੄ ઑ݀ਸ ׸׼. • Cח যڃ Viewܳ ࠁৈ઴ Ѫੋоܳ Ѿ੿೧ࢲ Modelীࢲ ߉਷ ؘ੉ఠܳ View۽ ֈѹષ. • ӒܻҊ ী۞ܳ যڌѱ ࠁৈ઴૑ܳ Ѿ੿೧ࢲ View۽ ֈѹષ
  24. ৵ Android MVCח աࢂо? • ݽ߄ੌ ജ҃੄ ޙઁ: ࠂ੟ೠ ࠺زӝ

    ୊ܻ, ۄ੉೐ ࢎ੉௿ ୊ܻ • উ٘۽੉٘੄ ޙઁ: View - Controller ܻ࠙о গݒೞ׮. • Fat Activity: Activity-Fragmentী ցޖ ݆਷ ۽૒੉ ٜযр׮. • Unit Testܳ ٜ݅ӝо ݒ਋ ө׮܂׮. • Ӓ Ѿҗ == ୨୓੸ դҴ • ୭ঈ੄ оةࢿ: ੌ੿੉ ә߅೧ઉب ׮ܲ ূ૑פযীѱ ب਑ਸ ਃ୒ೞӝ য۵׮. 
 ࢸݺೞח ѱ ؊ झ౟ۨझۄ.. ׼୭ ղо ࠊب ഁтܻחؘ যڌѱ ࢸݺਸ.. • ೞաೞա੄ ௿ېझٜ੉ ցޖ ݆਷ ৉ೡਸ ׸׼ -> ਬ૑ࠁࣻ ਊ੉ࢿ, ࣻ੿ಞ੄ࢿ, оةࢿ ١ ݆਷ ࠗ࠙ীࢲ ஂডೠ ௏٘о غߡܿ
  25. Model-View-Presenter? • 90֙؀ ઁউ, 2006֙ Martin Fowler੄ ࣗѐ۽ օܻ ঌ۰૗


    ଵઑ: GUI Architectures
 https://martinfowler.com/eaaDev/uiArchs.html • ࢎप উ٘۽੉٘ ୡӝࠗఠ ҳ੹ਵ۽ ੹೧ઉ ৳؍ ইఃఫ୊ • Viewח ࠺ૉפझ ۽૒ী ҙ۲ػ ࠗ࠙ਸ ҙৈೞ૑ ޅೞب۾ ܻ࠙, Presenter ۽ ֈӣ
  26. MVP੄ ੢੼ • Fat activity/fragment ߑ૑ • ੸੺ೠ ৉ೡ(responsibility)੄ ܻ࠙۽

    ੋ೧ ࣗझ оةࢿ + ಿ૕੉ ز߈ ࢚थ • ೒ۖಬ ੄ઓ੸ੋ UI ୊ܻח View ଃਵ۽ ܻ࠙೮ӝ ٸޙী Presenterח औѱ పझ౟ ੘ࢿ੉ оמ • Clean Architecture৬ 1:1 mapping оמ. CAܳ Ӓ؀۽ ଻ਊೞݶ ࢸ҅ ҙ۲ ֢۱ب ୭ࣗച
  27. What is not MVVM? • MVVM੄ ౠ૚਷ Life Cycle੉׮? •

    Android Architecture Component੄ ౠ૚ੌ ࡺ • Data Binding? - ೙ࣻח ইפա ࢎਊೞݶ ࢤ࢑ࢿী ഛपೠ ب਑੉ ؽ • RxMVVM? - ৉द ೙ࣻח ইפ૑݅.. Rx হ੉ח ݒ਋ ࠛಞೣ • ਊযীࢲ য়ח ഒۆ: ViewModel਷ গୡী ੜޅػ ѐ֛੉׮? • Modelҗ э੉ ੘਷ ױਤ۽ ଂѐઉ੓૑ ঋ਷ؘ׮, ాनী׮ ߹ ѱ ׮ ٜযо੓ח ഋకۄ য়೧ೡ ࣻ ੓਺ • Viewܳ ਤೠ Model(Entity)੉ۄח ѐ֛, ױߑೱ presenterۄח ف ѐ੄ ѐ֛ਸ, ViewModel੉ۄח ೞա੄ ੉ܴਵ۽ ыҊ ੓਺
  28. M-V-ViewModel? • ৉द ݃౯ ౵਎۞੄ Presentation Domain Separation (PDS)о दୡ

    • 2004֙ ࣗѐػ Presentation Model੉ ਗഋ • ଵઑ: https://martinfowler.com/eaaDev/PresentationModel.htmlɹ • Microsoftীࢲ ୊਺ ҳഅೣ • ViewModel: Uni-directional Mediator • Presenter৬ ݒ਋ ਬࢎೞա, ViewModel਷ Viewܳ ઁযೞ૑ ঋ਺ • Viewח ViewModelਸ ഐ୹ೞغ, Ѿҗח Callback / Observable ഋక۽ ߉਺
  29. MVVM vs MVP: ষ݃о જই, ইࡅо જই? • ل ׮

    ഴܯೠ ҳઑ. ঑ب੸ੋ ਋ਤח হ਺ • ٮۄࢲ ੉റ੄ ࢸݺب ݒ਋ ࢚؀੸੉ݴ, ೐۽ં౟ ࢿѺী ٮۄ ׮ܰѱ ߉ইٜৈ ૕ ࣻ ੓਺
  30. MVP੄ ࠺Ү਋ਤ • द੘ೞӝо औ׮. ੌױ ӝઓ ஶ౟܀۞੄ ۽૒ٜਸ ో੄

    refactor ӝמਵ۽ ୶ ୹(extract method)೧ࢲ Presenter۽ ৤ӝח Ѫࠗఠ द੘ೞݶ ؽ • ӝઓ ೐۽ં౟ܳ Ҋ୛ঠ ೞח ҃਋:
 Legacy code੄ ࠙۝੉ ݆Ѣա, ҳઑ ѐࢶী ઱য૓ दр੉ ݒ਋ ૣ਷ ҃਋ MVPо ؊ ਬܻ • Rxҕನૐ੉ ੓ח ҃਋:
 RxJavaܳ উ ॄب ഴܯೠ ҳઑܳ ٜ݅ ࣻ ੓׮. (ޛۿ RxJavaܳ ॳݶ ؊ જ ਷ ௏٘ܳ ૢ ࣻ ੓਺)
  31. MVVMח? • ୡӝ ૓ੑ੢߷਷ ࠙ݺ൤ ੓਺
 ӝઓ੄ ѐߊ ѐ֛ী ࠺೧

    ಁ۞׮੐ ੹ജ੉ ೙ਃ. 
 بੑ ୡӝূ যו ੿ب੄ ૓ా਷ хࣻ೧ঠೣ. • View੄ ࢚క ҙܻо ࠂ੟ೠ ҃਋ (== ؀ࠗ࠙੄ ࠂ੟ೠ জ)
 ViewModelীࢲ੄ ୊ܻо ؊ ੗োझۣ׮.
 ௾ ഥࢎীࢲ MVVMਸ ݆੉ٜ ଻ਊೞח ੉ਬ • Android Architecture Component റҟ ബҗ
 LifeCycle - ViewModel - LiveData - Room ઑ೤਷ ৘ઁب ݆׮ • Cross Platform ҳഅী ખ ؊ ਬܻ
 Data Binding, LiveData, Roomਸ ನӝೡ ҃਋, 
 Kotlinਸ Swift۽ ৤ӝח Ѫ݅ਵ۽ب View ੉৻੄ ࣗझ੄ 70% ੉࢚ਸ ੤ࢎਊ оמ
  32. MVVM - MVP ҕా੄ ੢੼ • ѐߊ ࣘبо ݻ ߓח

    ࡈۄ૓׮
 (઱੄: ѐੋର ੓਺. ୡӝ 2~3઱р ѐߊ ࣘبח ݻ ߓח ו۰૕ ࣻ ੓਺) • ௏٘ ߸҃ী ؀ೠ ف۰਑੉ (Ѣ੄) হয૓׮. • ٸ۰઱Ҋ र਷ ӝദ੗о әѺೠ ࢎন ߸҃ਸ ਃ୒೧ب ਓਵݶࢲ ؀୊ೡ ࣻ ੓׮ • 1֙ ٍী ׮द ௏٘ܳ ࠊب ૊द য٣ܳ Ҋ୛ঠೞח૑ ঌইରܾ ࣻ ੓׮ • ׮ܲ ূ૑פযীѱ ௏٘ܳ ࠁৈ઻ب ଃ౹ܻ૑ ঋח׮
  33. 1. Fat Presenter • ੉ઁח Presenterо ցޖ ݆ਸ ੌਸ ೠ׮!

    • పझ౟ ா੉झܳ ٜ݅ӝо য۰ਕ઎׮ • ੹ࠁ׮ח Ӓېب ի૑݅.. ৈ੹൤ ௏٘о ૑੷࠙ೞ׮. • ݃஖ Activity Manager э਷ ѱ ೞա טযաӝ݅ ೠ ו՝? • ઱ػ ਗੋ઺ ೞաח Presenterܳ View৬ ݺഛ൤ ܻ࠙ೞ૑ ঋ਷ Ѫ
  34. ೧Ѿ଼ • ௼ѱ Ҋ޹ೞ૑ ঋইب View৬ Presenterܳ ੜޅ ҳഅೞӝ য۵ب۾

    ೞח ੢஖ о ೙ਃ • Viewח ੉߮౟ܳ ߊࢤदఃҊ, UIܳ Ӓ۰઱ח ৉ೡ݅ਸ ׸׼, ࠺ૉפझ ۽૒੉ ա ݽ؛੉ ՙযٜ ࣻ ੓ח ৈ૑ܳ ରױ • Presenterо View੄ ࣁࠗ ࢎ೦ਸ ঌ ࣻ হب۾, Pח Viewܳ ୶࢚ച दఅ ഋక ۽݅ ଵઑೞب۾ ݅ٝ
  35. • View Interfaceܳ ాೠ ܻ࠙ • Mock Objectܳ ాೠ Unit

    Testо ݒ਋ एਕ૗ • Presenterח ࠺ૉפझ ۽૒ ୊ܻ݅ ׸׼ • Viewח Ӓܻӝ݅ ׸׼ • ؘ੉ఠ੄ ܻ࠙ب ೣԋ ੉ܞ૗: Viewח Modelী ؀೧ ঌ ೙ਃب, ঌ ࣻب হѱ ؽ • ೙ਃೠ ҃਋, Presenterө૑ Interfaceച दఇ MVP: Contractor Pattern
  36. • ژ ৉द Martin Fowlerо ੹౵ೠ ѐ֛ • ଵઑ: https://martinfowler.com/eaaDev/PassiveScreen.html

    • Fluxীࢲח Dumb Client, Clean Architectureীࢶ Humble ObjectۄҊ ܴࠗ • Viewח (೒ۖಬ ੄ઓ੸ੋ) Ӓܻӝ ੉৻ীח ইޖѪب ঌ ࣻ হب۾ ೣ • ۽Ӓੋ ചݶ੉ۄݶ, അ੤ ࢲߡ ੽ࣘ ઺ੋ૑ ৈࠗ, ۽Ӓੋ ࢿҕ ৈࠗ ١ઑରب View о ݽܰب۾.. -> isLoadingী true ੉߮౟о য়ݶ ಴द, ী۞ ৔৉ী ࡸ۰઴ ޙ ੗о য়ݶ ಴दೡ ࡺ 2. MVVM Best Practice: Passive View
  37. • ޥо ੉࢚ೠؘ? • Lighter View, Fatter ViewModel 
 ->

    Ӓ۞ݶ ViewModel੉ ؊ Ѣ؀೧૑ח ؘ ҡଳ਷о?? • ੄بػ Ѿҗ - MVVM਷ ؊ ա਷ ҳઑ۽ оӝ ਤೠ ઺ਃೠ оҮ
 যۄ?
  38. 3. ࠺ૉפझ ۽૒੄ ࠺؀ച • Presenterա ViewModel੄ بݫੋ ۽૒੉, х׼ೡ

    ࣻ হח ௼ӝо غח ࢚ട ੉ ৡ׮. • о੢ જ਷ ೧Ѿ଼਷ Single Responsibility Principle੄ ੸ਊ • ݽߧ ׹উ਷ ੉޷ ੓਺: ߄۽ Clean Architecture! • Presenterীࢲ بݫੋ ۽૒ਸ ܻ࠙ оמ • Data ҅க੄ ࣁ࠙ചܳ ా೧ ؊਌ ୶࢚ചػ ഋక੄ ҳઑ оמ
  39. • Clean Architecutre੄ ੢੼: Single Responsibility Principle੄ ୽पೠ ׳ࢿ •

    Presenter / Domain / Data ҅க੄ ܻ࠙۽ ੋ೧ ੹୓ ۽૒੄ ൒ܴ੉ ੌݾਃো ೧૗ -> оةࢿ ә࢚थ • ౠ੿ ௿ېझо ࠺؀೧૑ח Ѫਸ ߑ૑ • п layerр ҳ࠙੉ ݺഛೞ޲۽, п ৔ೱ ߧਤب ݺഛ • ױ, ௿ېझ ۝੉ әѺ൤ ૐо -> ೠ ߣী ҳഅೞ۰ ೞݶ ѐߊࣘب੄ ੷ೞ৬ ߡӒ ন࢑ਸ ঠӝೡ ࣻب ੓਺ ଵ औભ?
  40. • 6ѐ੄ ௿ېझ, 2ѐ੄ ੋఠಕ੉झ.. (3ѐ ࢤۚ) • Incremental Improvement

    • Clean Architectureী ੊ࣼೞ૑ ঋѢա ࠂ੟ೠ दझమ੄ ࢸ҅ ҃೷੉ হח ҃ ਋, ݽٚ Ѧ ٮۄೡ ೙ਃח হ਺ • ੌױ ೐ܻઃప੉࣌ ۽૒੄ ೤ܻചࠗఠ द੘ • View - ViewModel/Presenter - Repository - Model(Entity) • بݫੋ / ؘ੉ఠ ۽૒਷ ೙ਃ੄ ੄೧ ੼૓੸ਵ۽ ೞח Ѫ੉ ೤ܻ੸
  41. Ӓېب.. જӟ ೠؘ.. • ௿ېझо ցޖ ݆׮! • ੹୓੸ੋ ҳઑܳ

    ы୶ח ؘী ੸૑ ঋ਷ दр੉ ٜযр׮ • Ӓ۞ա જ਷ ߑߨ੉..! • ੉ ݽٚ Ѧ ੗زਵ۽ ٜ݅য ઱ח ೒۞Ӓੋ੉ ੓׮!
 https://github.com/kiuchikeisuke/Android-Studio-CleanArchitecture- template-forKotlin • RxJava, Dagger, Retrofit, AAC, Presenter/ViewModel ௏٘ө૑ ކٶ ݅ ٜয ષ • Swagger ૑ਗਵ۽ REST API call ੋఠಕ੉झب ੗زਵ۽ ٜ݅য ષ
  42. 3. ݻ о૑ դઁٜ.. • ҳઑ੄ ୍೟੸ ޙઁ: Presenter੄ ࠺ૉפझ

    ۽૒җ, Use Case੄ ࠺ૉפझ ۽ ૒਷ ؀୓ ޤо ౣܽо? • بݫੋ ۽૒੉ Use Caseী ٜযр׮ • ࢎস ࠗࢲ ࢎۈٜب ঌҊ ੓যঠ ೞח ۽૒੉ۄݶ, بݫੋ ۽૒
  43. RecyclerView in MVP • Presenter۽ ReclyerView - Adapterܳ যڌѱ ؀೧ঠೞחоח

    ݒ਋ ө׮۽ ਍ ޙઁ.. ੿׹਷ হणפ׮ 1. Activity/Fragmentо (Presenter੄ ݺ۸ਸ ߉ই) Adapterܳ ઁয - ױࣽ ೠ ಁఢ੄ ܻझ౟ীח ബҗ੸. Groupie э਷ ۄ੉࠳۞ܻܳ ࢎਊೞݶ ؊਌ ബҗ੸ 2. Adapter৬ ݒೝغח Presenterܳ ҳഅ 3. ѐ߹ itemҗ пп 1:1 ݒೝغח ੘਷ Presenterܳ ҳഅ
  44. RecyclerView in MVVM • Presenterী ࠺೧ࢶ ױࣽೠ ޙઁ. Data bindingਵ۽

    Ӓ؀۽ ViewModel োѾ оמ • ࠂ੟ೠ ҃਋о ইפۄݶ Adapterী ViewModel োѾ • ࠂ੟ೞ׮ݶ п Itemҗ ݒೝغח ੘਷ ViewModelਸ ҳഅ • ੉ ҃਋੄ ViewModel਷ Viewܳ ਤ೧ оҕػ Model੉ӝ ٸޙী যڃ ੄޷ী ࢲ ૓੿ೠ ViewModel.. • ઱੄ࢎ೦: AACܳ ੉ਊ೧ small ViewModelਸ ࢤࢿೡ ҃਋, providerী ౵ۄ ޷ఠܳ ߹ب ૑੿೧ঠ ೣ. ରۄܻ ࢚ਤ ViewModel੉ ࢤࢿೞח ѱ ؊ જਸ ࣻ ب ੓਺
  45. ୭Ӕ ҃೷ • ઑѤ: 6ѐ੄ ݽ߄ੌ ࢲ࠺झ(ب೤ 12ѐ੄ জ)о 100%

    ৻઱ ѐߊ۽ ҳഅػ জਵ ۽ ࢲ࠺झ غҊ ੓ח ࢚ട • җઁ: 3ѐ ࢲ࠺झ(6ѐ জ)ٜਸ 7ѐਘ ղ۽ ܻ׏঴ • য۰਍ ੼: ࠺ૉפझ ҙ੼ীࢶ জ ҳઑ ѐࢶ਷ ௾ о஖о হ਺. ঱ઁա Ӓۧ٠ ޙઁח ࢜۽਍ ӝמٜਸ ঴݃ա ࡅܲ ࣘب۽ ֍וջ.. • নզ੄ Ѩ: ߬౟թ ѐߊ ઑ૒ - ࣚ਷ ࡅؘܲ.. ଵ ࡅؘܲ.. • নզ੄ Ѩ 2: ঠӔ Ә૑ -> Ҋب۽ ബਯ੸ੋ ੘স ೙ਃ
  46. әೠ ੌ әೞ૑ ঋ਷ ੌ ઺ਃೠ ੌ ׼ো൤.. न ӝמ

    ҳഅ ߡӒ ࣻ੿ + জ উ੿ച Java -> Kotlin ߸ജ ViewModel or Presenter ੹ജ য়ېػ ۄ੉࠳۞ܻ тইఋӝ ઺ਃೞ ૑ ঋ਷ ੌ пઙ ഥ੄ ଵࢳ ੉࢚ೠ ߸ࣻݺ, ݫࣗ٘ݺ ߸҃ ٜৈॳӝ ߸҃ ӝఋ झఋੌ ࣻ੿
  47. Ѿҗ • 1ߣ૩ ࢲ࠺झ: ߬੉࠺ दఠ জ • ੹ݶ੸ੋ ҳઑ

    ѐࢶ਷ ӭՔೞѱ ನӝ. ब૑য iOSח ӝઓ ҳઑܳ ৮੹൤ ਬ૑ೠ ଻۽ नӝ מ݅ ୶о೮਺. Rx ࢎਊب ನӝ. ؀न API Callback ୊ܻܳ ӭՔೞѱ ೡ ࣻ ੓ח ҕా ௿ ېझ ҳഅ೧ࢲ উ੿ࢿ/ࢤ࢑ࢿਸ ੤Ҋ • উ٘۽੉٘ח о੢ ઺ਃೠ ࣁ ѐ੄ Fragment݅ MVP۽ ࣻ੿. աݠ૑ח नӏ ചݶ݅ MVP۽ ҳഅ • ݽٚ ࣗझܳ Kotlinਵ۽ ੗ز߸ജਸ ੉ਊ೧ࢲ ߸ജೞغ, ੌࠗ ޙઁ ࣗ૑੓ח ௏٘(Non- null ୊ܻ)ܳ ઁ৻ೞҌ ۨѢद ௏٘ܳ ޖܻೞѱ Kotlinझ۞਍ ௏٘۽ Ҋ஖۰Ҋ ೞ૑ח ঋ਺ • AAC੄ Life Cycle ӝמਸ ੉ਊೞӝ ਤ೧ ViewModelਸ ࢚ࣘ ߉ই Presenter ҳഅ • 7 to 9 principle ࣁ਑. য়റ 7~9दী݅ restructuring / refactoring ੘স
  48. Ѿҗ • 1ߣ૩ ࢲ࠺झ: ߬੉࠺ दఠ জ (҅ࣘ) • ӝઓ੄

    Challengingೠ ੌ੿ਸ, ޖ۰ 3઱ੌ ױ୷೧ࢲ োղ ܾܻૉ ࢿҕ • ѱ׮о ୹दܳ ੉ౣ খفҊ CPO۽ࠗఠ ц੘झۣѱ ޷оੑ ࢎਊ੗ܳ ਤೠ ѱझ ౟ ݽ٘ܳ ٜ݅য ׳ۄח ਃ୒ਸ ߉਺
 -> ਗې ഥਗ ੹ਊਵ۽݅ ٣੗ੋ غ঻؍ জ੉ۄ ࢚׼ೠ ؀ҕࢎ৓ਵա.. 1ੌ݅ী ؀ ਽ ৮ܐ (ҳഅ 3दр, ٣ߡӦ/৘৻ࢎ೦ ୊ܻ 5दр)
  49. Ѿҗ • 2ߣ૩ ࢲ࠺झ: ׏झ জ • উ٘۽੉٘, iOS ݽف

    MVVM ੸ਊ • ೒ۖಬ ઺݀ࢿਸ ਤ೧ RxJava/RxSwift - Realm ࢎਊ, Data Binding਷ ࢎਊೞ ૑ ঋ਺ • ଵҊ: 4 Reasons I’m not Using Android Data Binding
 https://medium.com/@Miqubel/4-reasons-im-not-using-android-data- binding-e62127c2650c (੷ח ݽف ز੄ೞ૑ח ঋणפ׮݅..) • 3ߣ૩ ࢲ࠺झ: ҳੋ/ҳ૒ জ • ੉ઃ ҕ੢ ݽ٘: 2ߣ૩ীࢲ ݅ٚ ҳઑܳ Ӓ؀۽ ੤ഝਊ೧ࢲ ନযղҊ ੓਺
  50. • ੹ਗ झணۄ ӝ߈ ಽ झఖ ূ૑פয • ઑѤ •

    ҃۱, ೟۱ ޖҙ • ߔূ٘/ݽ߄ੌ/೐ۿ౟ূ٘ ١ ࠙ঠ ޖҙ • ୡ١೟Ү 3೟֙ ࣻળ੄ ੌࠄয • ࠙ঠ, ѐߊ঱যח оܻ૑ ঋ਺: 
 о੢ ੗न ੓ח ঱য੄ ௏٬ प۱݅ ࠆ
 (য়೑࠘ ௏٬ పझ౟ ੓਺) • ઁѱ ੉ݫੌ۽ CV ઱दݶ ࢚׸೧٘݀פ׮. Nextbeatח ҳੋ઺! • ठۄ੉٘ ݂௼:
 https://speakerdeck.com/saryong/ mvvm-iyagi-droidknight-2018 • ࠶۽Ӓ ݂௼ (5/5):
 https://medium.com/@justfaceit • Email:
 [email protected]