Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Androidアプリにおける複雑な画面と向き合うための設計戦略

16d3962b8f11b7e801dacb129d20d8dd?s=47 KazaKago
November 14, 2018

 Androidアプリにおける複雑な画面と向き合うための設計戦略

16d3962b8f11b7e801dacb129d20d8dd?s=128

KazaKago

November 14, 2018
Tweet

More Decks by KazaKago

Other Decks in Programming

Transcript

  1. "OESPJEΞϓϦʹ͓͚Δ ෳࡶͳը໘ͱ޲͖߹͏ ͨΊͷઃܭઓུ גࣜձࣾΠάχεXJUIࣄۀ෦ ాଜݠհ!,B[B,BHP

  2. • ాଜ ݠհ @KazaKago • גࣜձࣾΠάχε • with Android൛ΤϯδχΞ •

    iOS΋ग़དྷΔΑʂ
  3. None
  4. ϚονϯάαʔϏε ͋Δ͋Δ

  5. ϓϩϑΟʔϧ͕ ௒௕͍ʂʂʂ

  6. ϝΠϯࣸਅ αϒࣸਅ ࣗݾ঺հจ ग़਎஍ झຯ ݁ࠗ؍ ͻͱ͜ͱ ډॅ஍ ݂ӷܕ ݁ࠗྺ

    ٳ೔ ೥ऩ ֶྺ ৬ۀ ܑఋ࢞ຓ ੑ֨
  7. ϝΠϯࣸਅ ϛογϣϯ ࣗݾ঺հ جຊϓϩϑΟʔϧ ͻͱ͜ͱ ৄࡉϓϩϑΟʔϧ ਍அ݁Ռ αϒࣸਅ ޷ΈΧʔυϕετ ޷ΈΧʔυ

    ՝ۚϦετΞ ૬ख͔Βݟͨը໘
  8. ͯΜ͜੝Γʂʂ

  9. ͜ΕʹΑͬͯ ։ൃ࣌ʹԿ͕ى͖Δ͔

  10. ͦ͏

  11. ΈΜͳͷ༑ୡ 'BU"DUJWJUZͷొ৔ʂ ʢ͍ΘΏΔ'BU$POUSPMMFSঢ়ଶʣ

  12. None
  13. XJUIͷϓϩϑΟʔϧը໘ͷίʔυ MyProfileTopPresenter … 875 line MyProfileTopActivity … 1712 line =

    2587 line !!!
  14. ͦΕ͡ΌؼΓ·͢Ͷ ͓ർΕ༷Ͱͨ͠ ͬͯݴ͍ͨ͘ͳΔ ʢʢʢʢ

  15. ͦΜͳંɺ ͜ͷը໘ͷશ໘վम͕ ෣͍ࠐΜͩ

  16. ͜Ε͸ϦϑΝΫλϦϯά νϟϯεͳͷͰ͸ʜʁ

  17. ৽࢓༷

  18. • ཁૉͷ਺ࣗମ͸มΘΒͣ • ը໘ߏ੒ͷมߋʹΑͬͯ͜ͷը໘ͷϩδοΫ͸ Ή͠Ζ૿͑ͨ • ݪܕ͕΄΅ͳ͘ɺҰ͔Β࡞Γ௚͠ • ֓೦্ͷϓϩϑΟʔϧ্ͷηΫγϣϯ͕ଘࡏ͢ Δ

    • ୯७ʹίʔυྔΛݮΒ͢ͷ͸೉͍͠
  19. վमํ਑

  20. • ֓೦্ͷηΫγϣϯผʹFragmentʹ෼ղ • Activity͸FragmentΛ഑ஔ͢Δ͚ͩʹప͢Δ • MVP -> MVVMύλʔϯ΁ͷҠߦ • Android

    Architecture Componentsͷ ViewModel, LiveDataͷ࠾༻ • Java -> Kotlin΁ͷҠߦ • CleanArchitectureͷపఈʹΑΔPresentation ૚ͷϩδοΫͷഉআ • Kotlin CoroutinesʹΑΔasync/awaitͷ࠾༻
  21. MyProfileTopActionBarFragment MyProfileTopBasicInfoFragment MyProfileTopEventFragment MyProfileTopKonomiBestFragment MyProfileTopKonomiFragment MyProfileTopMainPhotoFragment MyProfileTopMissionFragment MyProfileTopPersonalityFragment MyProfileTopSelfIntroductionFragment MyProfileTopSubPhotoFragment

  22. ͓ޓ͍ͷ'SBHNFOUͷσʔλͷ΍ΓऔΓ͸ 7JFX.PEFMͷ-JWF%BUBܦ༝ͰͷΈߦ͏ Fragment Fragment Fragment Fragment Activity ViewModel LiveData Presentation

    Layer Domain Layer UseCase UseCase UseCase UseCase
  23. ࠷ऴతʹ Ͳ͏ͳ͔ͬͨ

  24. MyProfileTopPresenter … 875 line -> MyProfileTopActivity … 1712 line ->

    MyProfileTop**Fragment … MyProfileTopViewModel … 7JFX.PEFM͸ߦ਺ͦ͜ଟ͍͕ɺ΄΅͢΂ͯͷ ϩδοΫΛυϝΠϯ૚΁Ҡৡ͍ͯ͠ΔͨΊɺ ΄ͱΜͲͷϝιου͕ߦҎԼʹ཈͑ΒΕͨ 242 line! Deleted! 168 average line! 936 line
  25. ॕʂ୤'BU"DUJWJUZʂ