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

Embedded frameworkを利用して既存プロジェクトでも爆速でTDD

shindyu
March 26, 2019

Embedded frameworkを利用して既存プロジェクトでも爆速でTDD

shindyu

March 26, 2019
Tweet

More Decks by shindyu

Other Decks in Technology

Transcript

  1. iOS #5 Copyright © 2019 Yahoo Japan Corporation. All Rights

    Reserved. Embedded frameworkΛར༻ͯ͠طଘϓϩδΣΫτͰ΋ര଎ͰTDD 2019.03.26[TUE] @LODGE Ϡϑʔגࣜձࣾ ৽ಊ ܟོ
  2. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ৽ಊ

    ܟོ ϠϑΦΫ! iOSΤϯδχΞ TDD, PairPrograming @shindyu
  3. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. એ఻ʂ

    @ٕज़ॻయ̑ ͞Θֶͬͯ΂Δ! iOSςετۦಈ։ൃ https://booth.pm/ja/items/1040471
  4. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ϠϑΦΫ!

    iOS • 2010೥͔Β։ൃ։࢝ • Swift: ໿20ສߦ / Objc: ໿11ສߦ • 2017೥ࠒ͔Β։ൃख๏ʹXPಋೖ
 ɹˠ TDDʴϖΞϓϩ
 ɹˠ test 3500έʔεҎ্
  5. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. XPΛಋೖ͔ͯ͠Β

    ϖΞϓϩɾϖΞϩʔς͢Δ͜ͱͰνʔϜͷٕज़ྗUP ίʔυϨϏϡʔͷετϨε͔Βղ์ TDDʹΑΔ৺ཧత҆શ
  6. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. XPΛಋೖ͔ͯ͠Β

    ϖΞϓϩ͢Δ͜ͱͰνʔϜͷٕज़ྗUP ίʔυϨϏϡʔͷετϨε͔Βղ์ TDDʹΑΔ৺ཧత҆શ TDDͰ͸Red, Green, RefactorͷϦζϜ͕େࣄ
  7. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. XPΛಋೖ͔ͯ͠Β

    ϖΞϓϩ͢Δ͜ͱͰνʔϜͷٕज़ྗUP ίʔυϨϏϡʔͷετϨε͔Βղ์ TDDʹΑΔ৺ཧత҆શ TDDͰ͸Red, Green, RefactorͷϦζϜ͕େࣄ ⚠ςετͷϏϧυ/࣮ߦ͕࣌ؒ૿Ճ⚠ → ϖΞϓϩͰͷίετ͸ഒ
  8. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. CleanArchitecture

    + Embedded frameworkΛ࠾༻ CleanArchitectureͰ੹຿Λ෼ׂ → ੹຿͕෼ׂ͞ΕΔ͜ͱͰςετ͕༰қʹͳΔ ෼ׂͨ͠ϞδϡʔϧΛEmbedded frameworkʹ → λʔήοτ෼ׂ͢Δ͜ͱͰϏϧυ͕࣌ؒ୹ॖ͞ΕΔ → είʔϓ͕খ͘͞ͳͬͯࠩ෼Ϗϧυ΋ޮ͖΍͘͢ͳΔ
  9. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ܭଌ݁Ռ

    ΫϦʔϯϏϧυ࣌ؒʢFramework: 6000ߦʣ App: 530s Framework: 18s શςετ࣮ߦ࣌ؒʢApp: 3500case / Framework: 200caseʣ App: 102s Frameworkɿ1s
  10. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. Project

    files • App • View / Repository / … • Domain • Presenter / UseCase / Entity / … • PresenterͷςετΛް͍ͨ͘͠ͷͰ
 ͋͑ͯFrameworkଆʹஔ͍͍ͯΔ • Ҏલ͸View͔ΒςετΛॻ͍͍͕ͯͨ Presenter͔Βॻ͘Α͏ʹͨ͠
  11. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. How

    to TDD 1. PresenterTestsͰςετΛॻ͘ 2. PresenterTestsΛ௨͢ 3. UIͱPresenter,OutputΛܨ͙
  12. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. How

    to TDD 1. PresenterTestsͰςετΛॻ͘ 2. PresenterTestsΛ௨͢ 3. UIͱPresenter,OutputΛܨ͙ Presenter, UseCase, Outputͷ InterfaceΛߟ͑Δ 1SFTFOUFS5FTUTTXJGU
  13. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. How

    to TDD 1. PresenterTestsͰςετΛॻ͘ 2. PresenterTestsΛ௨͢ 3. UIͱPresenter,OutputΛܨ͙ PresenterProtocol, PresenterImpl, UseCaseProtocol, OutputProtocolͷ࣮૷
  14. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. How

    to TDD 1. PresenterTestsͰςετΛॻ͘ 2. PresenterTestsΛ௨͢ 3. UIͱPresenter,OutputΛܨ͙ UIEvent → Presenter Output → UI൓ө
  15. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. How

    to TDD 1. PresenterTestsͰςετΛॻ͘ 2. PresenterTestsΛ௨͢ 3. UIͱPresenter,OutputΛܨ͙ UIEvent → Presenter Output → UI൓ө ⌘+Ctrl+[ or ⌘+Ctrl+]
  16. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ·ͱΊ

    CleanArchitecture + Embedded FrameworkΛ࠾༻ͨ͠ طଘϓϩδΣΫτͰ΋ര଎ͰTDDग़དྷΔΑ͏ʹͳͬͨ ര଎TDDͰ։ൃޮ཰Upʂ ͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠