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

チーム開発と Android アプリの構成

チーム開発と Android アプリの構成

第4回スタートアップAndroid勉強会
https://connpass.com/event/59928/

Ryutaro Miyashita

July 14, 2017
Tweet

More Decks by Ryutaro Miyashita

Other Decks in Programming

Transcript

  1. ΞʔΩςΫνϟ͸ࣅͯ͘Δ ‣ "DUJWJUZ'SBHNFOU$VTUPN7JFX  7JFX6*ͷ੍ޚʹूத͢Δ ‣ 7JFX.PEFM  7JFXͷͨΊͷ஋Λอ࣋͢Δ 

    7JFXͱϏδωεϩδοΫͷڮ౉͠ ‣ #VTJOFTT-PHJD  ஋ΦϒδΣΫτ  ϏδωεϩδοΫ
  2. "OESPJEͷ7JFX͸΍΍͍͜͠ ‣ "DUJWJUZ  'SBHNFOU %JBMPH'SBHNFOU #PUUPN4IFFU  $VTUPN7JFX ‣

    ը໘಺ͷίϯϙʔωϯτಉ࢜΋௨৴͕ඞཁ  7JFX.PEFMΛͲͷΑ͏ʹ࢖͏͔  %BUB#JOEJOHͱͲ͏૊Έ߹ΘͤΔ͔
  3. 7JFX.PEFMΛͲͷΑ͏ʹ࢖͏͔ ‣ "OESPJE"SDIJUFDUVSF$PNQPOFOUT  7JFX.PEFM1SPWJEFSTܦ༝Ͱڞ༗Ͱ͖Δ class MyFragment: Fragment() { val

    viewModel: MyViewModel by lazy { ViewModelProviders.of(activity) .get(MyViewModel::class.java) } }
  4. Ͳ͜ʹ஫໨͢Δ͔ ‣ ύοέʔδߏ଄ΛͲ͏෼ׂ͢Δ͔  lVJz΍lNPEFMzʹ෼͚Δͷ͸ྑ͋͘Δ  ෼͔Γ΍͍͢ ‣ Ͱ΋ 

    lBDUJWJUZzͳͲͰ෼͚͍ͯ͘ͷ͕ຊ౰ʹྑ͍ͷ͔  lը໘zʹண໨͢Δͱίʔυ͕෼ࢄͯ͘͠Δ  ͞ΒʹlWJFXNPEFMz΋ग़ͯ͘Δͱʜʜʁ ̻̻̻ƅЧƅ űŘŎŎŎ
  5. ఏҊ ‣ Ϣʔβʔ͕ண໨͢Δը໘Λߏ੒͢ΔཁૉͰ·ͱΊΔ - root - ui - hoge -

    HogeActivity.kt - HogeFragment.kt - HogeCustomView.kt - HogeViewModel.kt - fuga - ……
  6. ͳͥlΞʔΩςΫνϟzʹ஫໨͢Δͷ͔ ‣ ਓͳΒ ଟ෼ ͲΜͳܗͰ΋໰୊͸ͳ͍  ਓ ਓʜʜνʔϜʹͳ͖ͬͯͨΒʁ  டং͕ඞཁ

    ΞʔΩςΫνϟ͸டং νʔϜͷͨΊʹΞʔΩςΫνϟ͕͋Δ ‣ டং͕ͳ͍ͱͲ͏ͳΔͷ͔  ։ൃ଎౓͕མͪɺόά΋ੜ·ΕɺΧΦεʹͳΔ  Ϣʔβʔ΁ͷՁ஋ఏڙ͕ૄ͔ʹͳΔ