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

53bfbdcb19047611d02b215144a6a84b?s=47 shindyu
March 26, 2019

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

53bfbdcb19047611d02b215144a6a84b?s=128

shindyu

March 26, 2019
Tweet

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. TDDͯ͠·͔͢ʁ

  5. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ϠϑΦΫ!

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

    ϖΞϓϩɾϖΞϩʔς͢Δ͜ͱͰνʔϜͷٕज़ྗUP ίʔυϨϏϡʔͷετϨε͔Βղ์ TDDʹΑΔ৺ཧత҆શ
  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. XPΛಋೖ͔ͯ͠Β

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

    + Embedded frameworkΛ࠾༻
  10. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. CleanArchitecture

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

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

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

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

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

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

    to TDD 1. PresenterTestsͰςετΛॻ͘ 2. PresenterTestsΛ௨͢ 3. UIͱPresenter,OutputΛܨ͙ UIEvent → Presenter Output → UI൓ө
  17. 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+]
  18. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ·ͱΊ

  19. Copyright © 2019 Yahoo Japan Corporation. All Rights Reserved. ·ͱΊ

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