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

アッテiOSの設計と開発フローの変遷

8889da6a67db3667b0694d993c9a962c?s=47 Yosuke Ishikawa
April 19, 2016
13k

 アッテiOSの設計と開発フローの変遷

8889da6a67db3667b0694d993c9a962c?s=128

Yosuke Ishikawa

April 19, 2016
Tweet

Transcript

  1. ΞοςJ04ͷઃܭͱ ։ൃϑϩʔͷมભ 2016/04/18

  2. ࣗݾ঺հ 2 ੴ઒ ༸ࢿ (ishkawa) • 2016೥2݄ೖࣾͷiOSΤϯδχΞ • ΧϠοΫ →

    LINE → ι΢κ΢ • ઃܭΛߟ͑Δͷ͕޷͖
  3. INDEX 1. ಉ͡ߏ଄ͷ࣮૷ͷҰݩԽ 2. Ωϟογϡઓུ 3. σϓϩΠ

  4. ಉ͡ߏ଄ͷ࣮૷ͷҰݩԽ

  5. Α͋͘Δಉ͡ߏ଄ 5 1. ϖʔδωʔγϣϯ 2. ϑΥʔϜͷόϦσʔγϣϯ

  6. “ಉ͡ߏ଄”Λ୲౰͢Δͷ͸ViewModel 6 6*7JFX$POUSPMMFS 6*7JFX "1*$MJFOU 6*Πϕϯτ ϦΫΤετ Ϩεϙϯε View ViewModel

    Model 7JFX.PEFM දࣔ஋
  7. ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 7 1. λΠϜϥΠϯ 2. ͍͍ͶϦετ 3. ϝοηʔδ 4. ௨஌

    5. ίϝϯτ
  8. ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 8 5JNFMJOF 7JFX$POUSPMMFS "1*$MJFOU 5JNFMJOF 7JFX.PEFM -JLFE0⒎FST 7JFX$POUSPMMFS -JLFE0⒎FST

    7JFX.PEFM .FTTBHFT 7JFX$POUSPMMFS .FTTBHFT 7JFX.PEFM /PUJpDBUJPOT 7JFX$POUSPMMFS /PUJpDBUJPOT 7JFX.PEFM $PNNFOUT 7JFX$POUSPMMFS $PNNFOUT 7JFX.PEFM
  9. ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 9 5JNFMJOF 7JFX$POUSPMMFS "1*$MJFOU 1BHJOBUJPO 7JFX.PEFM&MFNFOU -JLFE0⒎FST 7JFX$POUSPMMFS .FTTBHFT

    7JFX$POUSPMMFS /PUJpDBUJPOT 7JFX$POUSPMMFS $PNNFOUT 7JFX$POUSPMMFS
  10. ԿΛύϥϝʔλʔԽ͢Δ͔ʁ 10 class PaginationViewModel<Element> { ... func bindRequest<Request: PaginationRequestType where

    Request.Response.Element == Element>(baseRequest: Request) { ... } } • ϖʔδωʔγϣϯͷΤϨϝϯτ(Message, NotificationͳͲ) • ϖʔδωʔγϣϯͷͨΊͷϦΫΤετ
  11. Ͳ͏࣮૷͢Δʁ 11 protocol PaginationRequestType: AtteRequestType { associatedtype Response: PaginationResponseType var

    page: Int64 { get } } protocol PaginationResponseType { associatedtype Element var elements: [Element] { get } var hasNextPage: Bool { get } } • ϓϩτίϧͰ࣮૷ͷͨΊͷ଍৔Λ༻ҙ • ϓϩτίϧͰఆٛͨ͠ΠϯλʔϑΣʔε͚ͩͰ࣮૷
  12. ϖʔδωʔγϣϯ͕ඞཁͳՕॴ 12 5JNFMJOF 7JFX$POUSPMMFS "1*$MJFOU 1BHJOBUJPO 7JFX.PEFM&MFNFOU -JLFE0⒎FST 7JFX$POUSPMMFS .FTTBHFT

    7JFX$POUSPMMFS /PUJpDBUJPOT 7JFX$POUSPMMFS $PNNFOUT 7JFX$POUSPMMFS
  13. ࣮૷ͷҰݩԽͰಘͨ΋ͷ 13 • ߴ଎ • ҆શ

  14. Ωϟογϡઓུͷมભ

  15. ౰ॳͷΩϟογϡઓུ 15 • RealmͰΩϟογϡΛऔΔ • Ϩεϙϯε͸RealmͷObjectͱͯ͠දݱ

  16. ౰ॳͷΩϟογϡઓུͷ໰୊఺ 16 Կ΋͔΋RealmͷObjectʹͳͬͯ͠·͏ͧ... • Կ͕ӬଓԽ͞Ε͍ͯΔͷ͔ܕ͔Β൑ผͰ͖ͳ͍ • ࡟আϙϦγʔ͕ෳࡶ • ϚΠάϨʔγϣϯର৅͕޿͘ͳΔ

  17. ͦ΋ͦ΋Realm͕୲ͬͯͨ΋ͷ͸ʁ 17 • ϨεϙϯεͷӬଓԽ • ը໘ؒͷมߋͷڞ༗

  18. ϨεϙϯεͷӬଓԽ 18 ࣺͯͯ΋ྑ͍΋ͷ͸ύʔδલఏͷػߏͰอଘ͢Δ • LRUͷσΟεΫΩϟογϡͰJSONΛอଘ • อଘ͞ΕͨJSONͱܕʹෆ੔߹͕͋Ε͹JSONΛࣺͯΕ͹ྑ͍ • ࡟আϙϦγʔɾϚΠάϨʔγϣϯͷ৺഑͕ͳ͘ͳͬͨ

  19. ϨεϙϯεͷӬଓԽ 19 ϨεϙϯεΛද͢ܕͷ੍ݶ͕ͳ͘ͳͬͨ • Ҏલ͸ObjectMapperΛ࢖͍ͬͯͨ • ݱࡏ͸HimotokiʹҠߦࡁΈ • JSONͷόϦσʔγϣϯͱܕͷΠϯελϯεԽΛҰகͤ͞ΒΕͨ •

    ෆਖ਼ͳJSONʹΑΔΤϥʔΛہॴతʹཹΊΔ͜ͱ͕Ͱ͖ͨ
  20. ը໘ؒͷมߋͷڞ༗ 20 άϩʔόϧͳSubjectͰڞ༗ • ಉظ͸ಉظ͕ಘҙͳ΋ͷʹ೚ͤΔ(RxSwift)

  21. ͪͳΈʹ 21 Realm͸ࠓͰ΋࢖ͬͯ·͢

  22. RealmͱLRUΩϟογϡͷ࢖͍෼͚ 22 • αʔόʔʹಧ͍͍ͯΔσʔλ: LRUσΟεΫΩϟογϡ • αʔόʔʹಧ͍͍ͯͳ͍σʔλ: Realm

  23. αʔόʔʹಧ͍͍ͯͳ͍σʔλ 23 1. ૹ৴தͷϝοηʔδɾίϝϯτ 2. ೖྗதͷϑΥʔϜ

  24. Ωϟογϡʹର͢ΔϙϦγʔ 24 దࡐదॴ

  25. ࣗಈσϓϩΠ

  26. ࣗಈσϓϩΠͷϞνϕʔγϣϯ 26 • Pull Request͕Ϛʔδ͞ΕͨΒ୭Ͱ΋ಈ࡞֬ೝͰ͖ΔΑ͏ʹ͍ͨ͠ • QA͕׬ྃͨ͠Β͙͢ʹ৹ࠪʹग़ͤΔΑ͏ʹ͍ͨ͠ • ୭͔ͷ؀ڥʹґଘͤͣʹσϓϩΠͰ͖ΔΑ͏ʹ͍ͨ͠

  27. Travis CI 27

  28. ࣗಈσϓϩΠͷϙϦγʔ 28 • git push͞ΕͨΒΞʔΧΠϒ + σϓϩΠ • Ϗϧυ൪߸͸Travis CI͕ৼΔ

    • खݩͰͷΞʔΧΠϒ͸جຊతʹ͸͠ͳ͍
  29. ؀ڥ 29 %FQMPZ(BUF %FWFMPQNFOU 5FTU'MJHIU
 1SPEVDUJPO

  30. Gitϒϥϯν͝ͱͷϏϧυλεΫ 30 • feature: ςετ • master: ςετ + Development

    • release: ςετ + Development + Production
  31. Ϗϧυ࣌ؒ 31

  32. Ϗϧυ࣌ؒ 32

  33. Ͳ͏ͳ͔ͬͨʁ 33 • ͙͢ಈ࡞Λ֬ೝͯ͠΋Β͑ΔΑ͏ʹͳͬͨ • Ϗϧυ͍ͯͩͬͯ͘͠͞ݴΘΕͳ͍ • ਃ੥ָ͕ʹͳͬͨ • ୭Ͱ΋ਃ੥Ͱ͖ΔΑ͏ʹͳͬͨ

  34. 34 ·ͱΊ

  35. ·ͱΊ 35 • ָʹ଎͘։ൃͰ͖ΔΑ͏ʹઃܭΛߟ͍͑ͯΔ • ϛε͕ى͜Γ΍͍͢ઃܭ͸ආ͚Δ • ୭Ͱ΋ؾܰʹσϓϩΠͰ͖ΔΑ͏ʹ͓ͯ͘͠ • ·ͩ·ͩൃల్্...ʂ

  36. None