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

iOSのClean Architecture テンプレ自動生成を支える技術 / generating CA's templates

iOSのClean Architecture テンプレ自動生成を支える技術 / generating CA's templates

shunsuke sato

October 16, 2018
Tweet

More Decks by shunsuke sato

Other Decks in Technology

Transcript

  1. Otemachi.swift #02 2018/10/16 J04ͷ$MFBO"SDIJUFDUVSF ςϯϓϨࣗಈੜ੒Λࢧ͑Δٕज़

  2. ࣗݾ঺հ w ࠤ౻ढ़ี !VTIJTBOUPBTPCV  w Ո଒ΞϧόϜΞϓϦʮΈͯͶʯΛ։ൃ w J04"OESPJE3BJMT։ൃମ੍ w

    IUUQTTQFBLFSEFDLDPNVTIJTBOUPBTPCVNJUFOFTFYDJUJOHEFWFMPQNFOU w ίʔώʔ͕޷͖Ͱ͢☕☕☕ w ίʔώʔநग़Ϩγϐͷه࿥ΞϓϦͱ͔࡞ͬͯ·͢ J04 "OESPJE
  3. ࠾༻ IUUQTNJUFOFVTSFDSVJU

  4. ࠓ೔࿩͢಺༰ͱͦͷܦҢ

  5. ࠓ೔࿩͢಺༰ͱͦͷܦҢ ΈͯͶͷJ04։ൃͰ͸൒೥લ͘Β͍͔Β $MFBO"SDIJUFDUVSFΛಋೖ ʢ৽نը໘࡞੒࣌ͳͲ͔Βঃʑʹʣ

  6. ࣗࣾNFFUVQͰ ΞʔΩςΫνϟ·ΘΓͷൃදʹରͯ͠ ஌Γ߹͍ͷΤϯδχΞ͔ΒπΠʔτ ࠓ೔࿩͢಺༰ͱͦͷܦҢ

  7. ࠓ೔࿩͢಺༰ͱͦͷܦҢ

  8. ࠓ೔࿩͢಺༰ͱͦͷܦҢ ΍ͬͯ͜͏ʂʂ

  9. ࠓ೔࿩͢಺༰ͱͦͷܦҢ ࡞ͬͨ΋ͷ

  10. ࠓ೔࿩͢಺༰ͱͦͷܦҢ ࡞ͬͨ΋ͷ

  11. ࠓ೔࿩͢಺༰ͱͦͷܦҢ ࡞ͬͨ΋ͷ

  12. Կ͕خ͍͠ͷ͔ʁ

  13. Կ͕خ͍͠ͷ͔ʁ  ࡞ۀίετΛݮΒ͢  ࢥߟίετΛݮΒ͢  J04ઐଐΤϯδχΞ͸͍ͳ͍ͱ͍͏νʔϜࣄ৘  ͦ΋ͦ΋$MFBO"SDIJUFDVUVSFͷϨΠϠͷ੾Γํ͸ ਓͦΕͧΕ

  14. ςϯϓϨࣗಈੜ੒Λࢧ͑Δٕज़

  15. ςϯϓϨࣗಈੜ੒Λࢧ͑Δٕज़  YDPEFQSPKΤσΟλ  ςϯϓϨʔτϑΝΠϧੜ੒

  16. - CocoaPods/Xcodeproj (1) - Xcode - File Templates (2) -

    krzysztofzablocki/Sourcery (2) - bannzai/Kuri (1,2) - rambler-digital-solutions/Generamba (?) ࢼͨ͠΋ͷPSࢼͦ͏ͱࢥͬͨ΋ͷ  YDPEFQSPKΤσΟλ  ςϯϓϨʔτϑΝΠϧੜ੒
  17. CocoaPods/Xcodeproj IUUQTHJUIVCDPN$PDPB1PET9DPEFQSPK

  18. CocoaPods/Xcodeproj IUUQTHJUIVCDPN$PDPB1PET9DPEFQSPK w $PDPB1PET಺Ͱ࢖ΘΕ͍ͯΔYDPEFQSPKΤσΟλ w ͍ͩͿރΕ͍ͯΔ͸ͣʢ࠷ॳͷίϛοτ೥ʣ

  19. l4PNFzͱ͍͏৽نϓϩδΣΫτΛ࡞੒ͯ͠ CocoaPods/Xcodeproj ࢖͍ํ

  20. CocoaPods/Xcodeproj ࢖͍ํ ͜ΜͳεΫϦϓτΛॻ͍࣮ͯߦͯ͠ΈΔͱɺɺɺ

  21. CocoaPods/Xcodeproj ࢖͍ํ ϑΝΠϧ͕௥Ճ͞Ε͍ͯΔʂʂ

  22. CocoaPods/Xcodeproj  UVJTUYDPEFQSPK  4XJGU੡  ޙड़͢Δ4PVSDFSZͰ࢖ΘΕ͍ͯΔ ྨࣅ෺

  23. Xcode - File Templates

  24. Xcode - File Templates  9$PEFͰ৽نϑΝΠϧੜ੒࣌ʹɺࣗલͰ༻ҙͨ͠ ςϯϓϨʔτΛར༻͢Δ͜ͱ͕Ͱ͖Δػೳ  3FGIUUQTRJJUBDPNTIVJUFNTEBFGEGFC 

    ίϚϯυ͔Βੜ੒͢Δͱ͔Ͱ͸ͳ͍
  25. Xcode - File Templates ࣗ෼Ͱ༻ҙͨ͠ςϯϓϨʔτΛબ୒͢Δ

  26. Xcode - File Templates ςϯϓϨʔτ͸͜Μͳײ͡

  27. Xcode - File Templates ϑΝΠϧ͕௥Ճ͞Ε͍ͯΔʂʂ

  28. krzysztofzablocki/Sourcery IUUQTHJUIVCDPNLS[ZT[UPG[BCMPDLJ4PVSDFSZ

  29. krzysztofzablocki/Sourcery ʢʮ4XJGUͷςϯϓϨʔτΛੜ੒ͯ͘͠ΕΔͳʹ͔ʯ ͱ͍͏ೝࣝͰௐ΂ͯΈ͚ͨͲɺࠓճͷ໨తʹ͸߹க͠ͳ͍ ͱ͍͏݁࿦ʹࢸͬͨɻ͚Ͳ͔ͤͬ͘ͳͷͰʣ

  30. krzysztofzablocki/Sourcery  ʢࣗ෼ͳΓͷݴ༿Ͱ·ͱΊΔͱʣ
 ϘΠϥʔϓϨʔτͳίʔυΛɺࢦఆͨ͠ϓϩτίϧΛ τϦΨʔʹɺςϯϓϨʔτΛݩʹࣗಈੜ੒͢Δ΋ͷ  3&"%.&͚ͩͩͱΘ͔Βͳ͔ͬͨͷͰҎԼΛࢀߟʹ ͨ͠  IUUQTXXXDBTFZMJTTDPNUIFNBHJDPGTPVSDFSZ

    IUUQTHJUIVCDPNLS[ZT[UPG[BCMPDLJ4PVSDFSZ
  31. krzysztofzablocki/Sourcery جຊతͳ࢖͍ํʢͷ͸ͣʣ l"VUP&RVBUBCMFzͱ͍͏ϚʔΧ༻ʢ໨ҹʣϓϩτίϧΛ࡞੒ͯ͠ɺBQQMZ͢Δ

  32. krzysztofzablocki/Sourcery جຊతͳ࢖͍ํʢͷ͸ͣʣ ςϯϓϨʔτʹ͸z4UFODJMͱ͍͏΋ͷΛ࢖͏

  33. krzysztofzablocki/Sourcery جຊతͳ࢖͍ํʢͷ͸ͣʣ Ϗϧυຖʹੜ੒͞ΕΔΑ͏ʹઃఆ

  34. krzysztofzablocki/Sourcery جຊతͳ࢖͍ํʢͷ͸ͣʣ Ϗϧυ͢Δͱ͜ͷΑ͏ͳϑΝΠϧ͕ੜ੒͞ΕΔ☺

  35. krzysztofzablocki/Sourcery ྑͦ͞͏ʹࢥ͑ͨࣄྫ  MFUͳTUSVDUͷQSPQFSUZʹ஋Ληοτ͢Δ  IUUQTRJJUBDPNNBSUZTV[VLJJUFNTEBGFEBDEG  Πϕϯτϩά  IUUQTTQFBLFSEFDLDPNTHSLTNUJNQSPWFFWFOUMPHVTJOH

    TPVSDFSZJOJPT
  36. bannzai/Kuri IUUQTHJUIVCDPNCBOO[BJ,VSJ

  37. bannzai/Kuri  $MFBO"SDIJUFDUVSFςϯϓϨϑΝΠϧࣗಈੜ੒πʔϧ ʢࠓճͷ໨తʹ׬શʹҰக͢Δ΋ͷʣ  ։ൃऀ͸೔ຊਓͷํ  YDPEFQSPKΤσΟλ΋ࣗલ IUUQTHJUIVCDPNCBOO[BJ,VSJ

  38. bannzai/Kuri جຊతͳ࢖͍ํ ઃఆϑΝΠϧʢz,VSJZNMzʣʹɺੜ੒͍ͨ͠ϑΝΠϧʹ߹Θͤͯίϯϙʔωϯτ৘ใΛهड़͢Δ

  39. bannzai/Kuri جຊతͳ࢖͍ํ ͦΕͧΕͷίϯϙʔωϯτͷςϯϓϨʔτϑΝΠϧΛ࡞ͬͯ഑ஔ͢Δ

  40. bannzai/Kuri جຊతͳ࢖͍ํ lLVSJHFOFSBUF'PPUCBMMzͰ࣮ߦ͢Δͱɺɺɺ៉ྷʹϑΝΠϧ͕ੜ੒͞Ε͍ͯΔ

  41. bannzai/Kuri جຊతͳ࢖͍ํ lLVSJHFOFSBUF'PPUCBMMzͰ࣮ߦ͢Δͱɺɺɺ៉ྷʹϑΝΠϧ͕ੜ੒͞Ε͍ͯΔ

  42. rambler-digital-solutions/Generamba IUUQTHJUIVCDPNTUSPOHTFMG(FOFSBNCB

  43. rambler-digital-solutions/Generamba  ࠓճ͸εΩοϓ  ηοτΞοϓͰ͍᪴ͨ  ͋·Γ։ൃ͕׆ൃͰͳ͍ʁ  ࠷ۙ஌ͬͨ΋ͷ IUUQTHJUIVCDPNTUSPOHTFMG(FOFSBNCB

  44. ݁Ռɺࣗ෼͸Ͳ͏͔ͨ͠ʁ

  45. ݁Ռɺࣗ෼͸Ͳ͏͔ͨ͠ʁ $PDPB1PET9DPEFQSPK 3VCZ 
 
 ςϯϓϨੜ੒͸ࣗલͰΰϦΰϦ

  46. ݁Ռɺࣗ෼͸Ͳ͏͔ͨ͠ʁཧ༝  ࣮ϓϩδΣΫτ͸ྺ࢙తܦҢͳͲͷཧ༝͔ΒҎ֎ͱෳࡶ  ੜ੒͍ͨ͠ϑΝΠϧ໊ͱσΟϨΫτϦ໊͕ҟͳͬͨΓ  ಉҰσΟϨΫτϦʹෳ਺ͷϑΝΠϧΛஔ͖͔ͨͬͨΓ  νʔϜΈΜͳ͕3VCZॻ͚Δͱ͍͏ͷ΋͋Δ 

    ӡ༻ͯ͠Έͯผͷํ๏ʹ͢Δ͔΋ɻͩ͜ΘΓ͸ͳ͠
  47. ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠