2017年に新規アプリを立ち上げた話

 2017年に新規アプリを立ち上げた話

shibuya.apk #20

85cab5fdf09afe3ee78ce3667681915a?s=128

Keisuke Kobayashi

December 08, 2017
Tweet

Transcript

  1. 2017೥ʹ৽نΞϓϦ Λ্ཱͪ͛ͨ࿩ Keisuke Kobayashi (@kobakei) shibuya.apk #20

  2. About Me • Keisuke Kobayashi • GitHub, Qiita: kobakei •

    Twitter: kobakei122 • Kyash, Inc • ݸਓࣄۀओ΋΍ͬͯ·͢
  3. 2017೥ʹ৽͘͠ΞϓϦΛ
 ্ཱͪ͛ͨ࿩Λ͠·͢

  4. Kyash • ݸਓؒૹۚαʔϏε • 2017೥4݄ʹiOS൛ϦϦʔε • 2017೥7݄ʹAndroid൛ϦϦʔε

  5. Kyash • ݸਓؒૹۚαʔϏε • 2017೥4݄ʹiOS൛ϦϦʔε • 2017೥5݄ʹԶೖࣾ • 2017೥7݄ʹAndroid൛ϦϦʔε

  6. 2͔݄ͪΐͬͱͰϦϦʔε • AndroidΤϯδχΞ1ਓ • େମ40ը໘ • αʔόʔͷAPI͸͢Ͱʹ͋Δ • ͍͔ʹͯ͠ϦϦʔε͔ͨ͠

  7. Kotlin • Google I/Oલʹ࠾༻ • Kotlinͷํ͕։ൃ଎౓ૣ͍Β͍͠ͱ͍͏ᷚ • ษڧ͠ͳ͕Βॻ͖͢͢ΊΔ • Better

    Javaͱͯ͠ॻ͚ͩ͘ͳΒ͙͢׳ΕΔ
  8. ࣮ࡍͲ͏͔ͩͬͨ • λΠϓྔ͕ݮͬͨ • Data class • Delegated property •

    NPE͕ݮͬͨ • Nullڐ༰ or ඇڐ༰
  9. ྫ: Delegated property class MainActivity : AppCompatActivity { companion object

    { fun createIntent(context: Context, hoge: String?, fuga: Int): Intent { return Intent(context, MainActivity::class.java).apply { putExtra(MainActivity::hoge.name, hoge) putExtra(MainActivity::fuga.name, fuga) } } } val hoge: String? by ExtraNullable() val fuga: Int by ExtraNonNull() }
  10. ࠔͬͨͱ͜Ζ • είʔϓؔ਺ͷ࢖͍ํʹ໎ͬͨ • ࠷ۙ͸ͨΖ͏͞Μͷϑϩʔνϟʔτʹै͏ • ParcelizeΛಋೖͨ͠ΒJBͰىಈ͠ͳ͘ͳͬͨ • ͋͘·ͰExperimentalͳͷͰ஫ҙ

  11. ઃܭ • MVVM + ϨΠϠʔυΞʔΩςΫνϟ • Data binding • ֤֊૚ΛRxJavaͰͭͳ͙

    • ϥΠϑαΠΫϧʹԠͯ͡dispose͞ΕΔ࢓૊ Έ
  12. None
  13. ϥΠϒϥϦ • ͍͍ͩͨఆ൪Λ࢖͍ͬͯΔ • ϒϩάʹ·ͱΊ·ͨ͠ • Android։ൃʹ͓͚Δఆ൪ϥΠϒϥϦ22બ

  14. ఆ൪Ҏ֎ʹศརͬΆ͍΋ͷ • DeepLinkDispatch • Airbnb࡞ɻΞϊςʔγϣϯͰσΟʔϓϦϯΫͷίʔυΛࣗಈੜ ੒ • debot • ϝϧΧϦͷࠓҪ͞Μ࡞ɻ୺຤ΛৼͬͯσόοάϝχϡʔΛग़͢

    • MaterialChipsInput • GmailͷѼઌબ୒UIͬΆ͍ΞϨ
  15. None
  16. Architecture Components • ։ൃ౰࣌·ͩbetaͩͬͨͷͰ࢖Θͳ͔ͬͨ • RxLifecycleͬΆ͍࢓૊ΈΛࣗ࡞ͨ͠ • ͍͍ײ͡ʹCompositeDisposableʹadd͢Δ ࢓૊Έ •

    ORM͸OrmaΛ࢖ͬͨ
  17. ࣗ࡞ͨ͠ϥΠϒϥϦ • FabSpeedDial • طଘͷϥΠϒϥϦ͕ඍົͩͬͨͷͰ࡞ͬͨ • ͍͔ͭ͘ͷUIϥΠϒϥϦ͸forkͨ͠ • UIϥΠϒϥϦ͸์ஔ͞Ε͕ͪ

  18. None
  19. ςετ • ୯ମςετ • Rolectric + mockito-kotlin • Mockito-kotlin͸͍͍ͧ •

    UIςετ • ͪΐͬͱԿݴͬͯΔ͔Θ͔Βͳ͍Ͱ͢
  20. Mockito-kotlin val mock = mock<SomeClass> { on { hoge() }

    doReturn "hoge" on { fuga() } doReturn "fuga" }
  21. ·ͱΊ • Kyash Android൛ͷ։ൃΛࢧٕ͑ͨज़Λ঺հ͠·ͨ͠ • Kotlin • ઃܭ • ϥΠϒϥϦ

    • ςετ
  22. Α͍͓೥Λʂ