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

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

kazakago
November 14, 2018

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

kazakago

November 14, 2018
Tweet

More Decks by kazakago

Other Decks in Programming

Transcript

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

    View full-size slide

  2. • ాଜ ݠհ @KazaKago
    • גࣜձࣾΠάχε
    • with Android൛ΤϯδχΞ
    • iOS΋ग़དྷΔΑʂ

    View full-size slide

  3. ϚονϯάαʔϏε
    ͋Δ͋Δ

    View full-size slide

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

    View full-size slide

  5. ϝΠϯࣸਅ
    αϒࣸਅ ࣗݾ঺հจ
    ग़਎஍
    झຯ
    ݁ࠗ؍
    ͻͱ͜ͱ
    ډॅ஍
    ݂ӷܕ
    ݁ࠗྺ
    ٳ೔
    ೥ऩ
    ֶྺ
    ৬ۀ
    ܑఋ࢞ຓ
    ੑ֨

    View full-size slide

  6. ϝΠϯࣸਅ
    ϛογϣϯ
    ࣗݾ঺հ
    جຊϓϩϑΟʔϧ
    ͻͱ͜ͱ
    ৄࡉϓϩϑΟʔϧ
    ਍அ݁Ռ
    αϒࣸਅ
    ޷ΈΧʔυϕετ
    ޷ΈΧʔυ
    ՝ۚϦετΞ
    ૬ख͔Βݟͨը໘

    View full-size slide

  7. ͯΜ͜੝Γʂʂ

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  10. XJUIͷϓϩϑΟʔϧը໘ͷίʔυ
    MyProfileTopPresenter … 875 line
    MyProfileTopActivity … 1712 line
    =
    2587 line !!!

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  15. • ֓೦্ͷηΫγϣϯผʹFragmentʹ෼ղ
    • Activity͸FragmentΛ഑ஔ͢Δ͚ͩʹప͢Δ
    • MVP -> MVVMύλʔϯ΁ͷҠߦ
    • Android Architecture Componentsͷ
    ViewModel, LiveDataͷ࠾༻
    • Java -> Kotlin΁ͷҠߦ
    • CleanArchitectureͷపఈʹΑΔPresentation
    ૚ͷϩδοΫͷഉআ
    • Kotlin CoroutinesʹΑΔasync/awaitͷ࠾༻

    View full-size slide

  16. MyProfileTopActionBarFragment
    MyProfileTopBasicInfoFragment
    MyProfileTopEventFragment
    MyProfileTopKonomiBestFragment
    MyProfileTopKonomiFragment
    MyProfileTopMainPhotoFragment
    MyProfileTopMissionFragment
    MyProfileTopPersonalityFragment
    MyProfileTopSelfIntroductionFragment
    MyProfileTopSubPhotoFragment

    View full-size slide

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

    View full-size slide

  18. ࠷ऴతʹ
    Ͳ͏ͳ͔ͬͨ

    View full-size slide

  19. MyProfileTopPresenter … 875 line ->
    MyProfileTopActivity … 1712 line ->
    MyProfileTop**Fragment …
    MyProfileTopViewModel …
    7JFX.PEFM͸ߦ਺ͦ͜ଟ͍͕ɺ΄΅͢΂ͯͷ
    ϩδοΫΛυϝΠϯ૚΁Ҡৡ͍ͯ͠ΔͨΊɺ
    ΄ͱΜͲͷϝιου͕ߦҎԼʹ཈͑ΒΕͨ
    242 line!
    Deleted!
    168 average line!
    936 line

    View full-size slide

  20. ॕʂ୤'BU"DUJWJUZʂ

    View full-size slide