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

マネーフォワードの設計へのアプローチ

koutalou
March 16, 2017
3.5k

 マネーフォワードの設計へのアプローチ

CAMPFIRE iOS #1で発表した発表資料です。

Architectureの選定や、マネーフォワードでのClean Architectureの取り組みについてのお話です。

koutalou

March 16, 2017
Tweet

Transcript

  1. $MFBO"SDIJUFDUVSF 7JFX 1SFTFOUFS 6TF$BTF 5SBOTMBUPS .PEFM %BUB4UPSF &OUJUZ 3FQPTJUPSZ 1SFTFOUBUJPO-BZFS

    %PNBJO-BZFS %BUB-BZFS w ੹຿Λࡉ෼Խ͢Δ͜ͱͰɺ֤ϨΠϠ͕ԿΛ୲౰͢Δ͔໌֬ʹͳΔ w 6*ͱϏδωεϩδοΫΛ෼཭Ͱ͖ɺϨΠϠؒͷґଘΛ࠷খݶʹͰ͖Δ w ϨΠϠؒ͸ૄ݁߹ͳͷͰϞδϡʔϧͷஔ͖׵͑ɺςετ͕༰қ
  2. ໰୊Λײ͍ͯ͡ͳ͍έʔε w গਓ਺Ͱن໛ͷখ͞ͳΞϓϦέʔγϣϯ͸ɺશ༰Λ೺Ѳ͠΍͍͢ w εϞʔϧελʔτͳͲͰ·ͣಈ͘΋ͷΛ࡞Γ͍ͨ w ϩδοΫ͕γϯϓϧͰಛʹෳࡶͳॲཧ͕ଘࡏ͠ͳ͍ ΤϯδχΞ ΤϯδχΞ ΤϯδχΞ

    ҰਓͰ։ൃ͢Δ͠ɺ ͦΜͳʹن໛΋େ͖͘ͳ͍ ͱʹ͔͘εϐʔυײॏࢹ ·ͣ͸ϞϊΛ࡞Γ͍ͨ ΞϓϦέʔγϣϯͷ ϩδοΫ͕ෳࡶͰ͸ͳ͍ → VIPER΍Clean Architecture͸޲͍͍ͯͳ͍
  3. νʔϜͰ"SDIJUFDUVSFΛڞ༗ 7JFX 1SFTFOUFS 6TF$BTF 5SBOTMBUPS .PEFM %BUB4UPSF &OUJUZ 3FQPTJUPSZ 1SFTFOUBUJPO-BZFS

    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4U &OUJUZ 3FQPTJU Ұؾʹશͯ࡞Γ௚͠ͷΑ͏ͳϦϑΝΫλ͸ͤͣɺ

    ը໘୯ҐͰঃʑʹ$MFBO"SDIJUFDUVSF΁ஔ͖׵͑ 7JFX 1SFTFOU 6TF$BT 5SBOTMB .PEFM %BUB4U &OUJUZ 3FQPTJU 7JFX 1SFTFOU 6TF$BT 5SBOTMB .PEFM %BUB4U &OUJUZ 3FQPTJU
  8. 1SPUPDPM0SJFOUFE1SPHSBNNJOH 1SFTFOUFS 6TF$BTF 5SBOTMBUPS .PEFM %BUB4UPSF &OUJUZ 3FQPTJUPSZ TUSVDU DMBTT

    7JFX ɹ1SPUPDPM0SJFOUFE1SPHSBNNJOHΛҙࣝ͢Δ w QSPUPDPMΛ࢖ͬͨ*'ʹΑΔ࠷খݶͷґଘؔ܎ w QSPUPDPMʹ४ڌ࣮ͨ͠૷͸FYUFOTJPOͰهड़ w DMBTT͸ۃྗ࢖ΘͣTUSVDUͰ࣮૷͢Δ
  9. ςετͷ༰қੑ RepositoryMockImpl 7JFX 1SFTFOUFS 6TF$BTF 5SBOTMBUPS .PEFM %BUB4UPSF &OUJUZ 3FQPTJUPSZ

    QSPUPDPMʹ४ڌͨ͠.PDL΍ςετίʔυͰ
 ϨΠϠຖͷॊೈͳςετ͕Մೳ 3FQPTJUPSZΛ.PDLʹͯ͠ &OUJUZˠ.PEFMͷม׵Λςετ 6TF$BTFΛ.PDLʹͯ͠ɺ 7JFXͷ&WFOUʹର͢Δ1SFTFOUFSͷڍಈΛςετ UseCaseMockImpl