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

初めての RIBs

初めての RIBs

RIBs アーキテクチャについての紹介。RIBs への理解の手助けになれば幸いです。

参考文献:
・JapanTaxi iOSアプリにRIBsアーキテクチャを導入して得られたこと
https://lab.mo-t.com/blog/andonlabo-4-ribs-ios-app

・RIBs アーキテクチャにおける Unit Test への取り組み
https://lab.mo-t.com/blog/andonlabo-ios-ribs-unit-test

63bf22db8ab8da3851da34d2e0cb0c69?s=128

Yosuke Imairi

May 07, 2020
Tweet

More Decks by Yosuke Imairi

Other Decks in Technology

Transcript

  1. ॳΊͯͷ3*#T

  2. 3*#T IUUQTHJUIVCDPNVCFS3*#T

  3. 3*#TΛ࠾༻͍ͯ͠ΔΞϓϦ

  4. ୈҰষɿ3*#Tͱ͸

  5. 3*#Tͱ͸ 3*#TΛߏ੒͢Δ΋ͷ 3PVUFS ϏδωεϩδοΫͷϧʔςΟϯάΛ୲͏ ඞཁͰ͋Ε͹ը໘ભҠ΋͓͜ͳ͏ *OUFSBDUPS ϏδωεϩδοΫ ௨৴ॲཧɺঢ়ଶͷߋ৽ɺ1SFTFOUFS΍3PVUFS΁ͷ໋ྩ #VJMEFS 3PVUFSͱ*OUFSBDUPSͷੜ੒ʢඞཁͰ͋Ε͹1SFTFOUFS΋ʣ

    ੜ੒࣌ʹ%*Λ͓͜ͳ͏
  6. 3*#Tͱ͸ ͦΕͧΕ͕ͲͷΑ͏ʹίϛϡχέʔγϣϯ͍ͯ͠Δͷ͔

  7. #VJMEFS #VJMEFS ʢᶃ1SFTFOUFSͷੜ੒ɺॳظԽʹඞཁͳ৘ใΛ%*ʣ 3*#Tʹ͓͍ͯɺ1SFTFOUFS͸ඞͣ͠΋ඞཁͰ͸ͳ͍ 1SFTFOUFS

  8. #VJMEFS #VJMEFS *OUFSBDUPS 1SFTFOUFS ᶄ*OUFSBDUPSͷੜ੒ɺॳظԽʹඞཁͳ৘ใΛ%*

  9. #VJMEFS #VJMEFS *OUFSBDUPS 1SFTFOUFS ᶅ3PVUFSͷੜ੒ɺॳظԽʹඞཁͳ৘ใΛ%* ੜ੒͞Εͨ3PVUFSΛฦ͢ 3PVUFS

  10. 3PVUFS 3PVUFS͸ॳظԽ࣌ʹɺ࣍ͷϧʔςΟϯάઌͷ#VJMEFSΛอ͍࣋ͯ͠Δ ࣗ਎Λʮ਌ʯͱ͢ΔͱɺϧʔςΟϯάઌ͕ʮࢠʯʹͳΔ 3PVUFS $IJME 3*#`T#VJMEFS

  11. 3PVUFS ࢠ3*#ͷ#VJMEFSΛ࢖͍ɺࢠ3*#ͷ3PVUFSΛऔಘ͢Δ 3PVUFS $IJME 3*#`T#VJMEFS *OUFSBDUPS 1SFTFOUFS 3PVUFS build()

  12. 3PVUFS ࢠ3*#ͷ3PVUFSΛ׆ੑঢ়ଶʢBDUJWFʣʹ͢Δ ׆ੑঢ়ଶʹͳΔͱɺͦͷ3*#ͷ*OUFSBDUPSͷॲཧ͕։࢝͢Δ 3PVUFS 3PVUFS attachChild()

  13. 3PVUFS ʢඞཁͰ͋Ε͹ɺࢠ3*#ͷ1SFTFOUFSΛදࣔ͢Δʣ 3PVUFS 3PVUFS present() 1SFTFOUFS 1SFTFOUFS

  14. 3PVUFS ࢠ3*#ͷ3PVUFSΛඇ׆ੑঢ়ଶʢEFBDUJWFʣʹ͢Δ ඇ׆ੑঢ়ଶʹͳΔͱɺͦͷ3*#ͷ*OUFSBDUPSͷॲཧ͕ఀࢭ͢ΔʢϝϞϦ্͔Βফ͑Δʣ 3PVUFS 3PVUFS detachChild()

  15. 3PVUFS ʢඞཁͰ͋Ε͹ɺࢠ3*#ͷ1SFTFOUFSΛඇදࣔ͢Δʣ 3PVUFS 3PVUFS dismiss() 1SFTFOUFS 1SFTFOUFS

  16. *OUFSBDUPS 3PVUFS΁ͷ໋ྩ ࣍ͷϏδωεϩδοΫͷϧʔςΟϯάΛࢦࣔ͢Δ *OUFSBDUPS 1SFTFOUFS 3PVUFS Routing

  17. *OUFSBDUPS ʢ1SFTFOUFS΁ͷ໋ྩʗ1SFTFOUFS͔Βͷ໋ྩʣ 7JFXͷഎܠ৭Λม͑Δɺ-BCFMͷςΩετΛߋ৽ͤ͞Δ Ϙλϯ͕ԡ͞Εͨॲཧͷҕৡ *OUFSBDUPS 1SFTFOUFS 3PVUFS Presentable PresentableListener

  18. *OUFSBDUPS ࢠ3*#ͷ*OUFSBDUPS͔Βͷ໋ྩΛड͚Δ ʢʹ਌3*#ͷ*OUFSBDUPS΁໋ྩ͢Δʣ *OUFSBDUPS 1SFTFOUFS 3PVUFS *OUFSBDUPS 1SFTFOUFS 3PVUFS Listener

  19. *OUFSBDUPS͕΍͍ͬͯΔ͜ͱ ྫɿࢠ3*#ͷ1SFTFOUFSͰด͡ΔϘλϯ͕ԡ͞Εͨ৔߹ ᶃࢠ3*#ͷ*OUFSBDUPS͕ด͡ΔϘλϯ͕ԡ͞Εͨ͜ͱΛݕ஌͠ɺ ᶄ਌3*#ͷ*OUFSBDUPSʹը໘Λด͡ΔΑ͏௨஌͢Δ ᶅ਌3*#ͷ*OUFSBDUPS͸ɺࣗ਎ͷ3PVUFSʹEFUBDIΛཁٻ͢Δ *OUFSBDUPS 1SFTFOUFS 3PVUFS *OUFSBDUPS 1SFTFOUFS

    3PVUFS ② ① ③
  20. 3*#಺ͷίϛϡχέʔγϣϯ·ͱΊ #VJMEFS $IJME 3*#`T#VJMEFS *OUFSBDUPS 1SFTFOUFS 3PVUFS *OUFSBDUPS 1SFTFOUFS 3PVUFS

    Listener Presentable PresentableListener Routing
  21. 3*#TͷϥΠϑαΠΫϧ parentRouter.attachChild() load() internalDidLoad() didLoad() parentRouter.detachChild() activate() didBecomeActive() deactivate() willResignActive()

    3PVUFS *OUFSBDUPS
  22. 3*#TͷϥΠϑαΠΫϧ 3*#T͸7JFX$POUSPMMFSͷϥΠϑαΠΫϧʹґଘ͠ͳ͍

  23. ϏδωεϩδοΫͲ͓ΓʹΞϓϦ͕ߏ੒͞ΕΔ 3*#T͸7JFX$POUSPMMFSͷϥΠϑαΠΫϧʹґଘ͠ͳ͍

  24. ΫϩεϓϥοτϑΥʔϜ ϏδωεϩδοΫͲ͓ΓʹΞϓϦ͕ߏ੒͞ΕΔ 3*#T͸7JFX$POUSPMMFSͷϥΠϑαΠΫϧʹґଘ͠ͳ͍ J04"OESPJEͰઃܭΛڞ௨ԽͰ͖Δ

  25. ୈೋষɿϧʔςΟϯά

  26. ΞϓϦͷϏδωεϩδοΫ ΞϓϦىಈ࣌ͷॲཧ ϝϯςφϯεϞʔυ͔Ͳ͏͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌΍Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹɹFUD ϩάΞ΢τঢ়ଶͳΒʜʜ

    ϩάΠϯը໘΁ભҠɹFUD
  27. ΞϓϦͷϏδωεϩδοΫ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF

    .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ
  28. 3*#TπϦʔ 3*#TͰ͸ϏδωεϩδοΫΛπϦʔߏ଄Ͱදݱ͠ɺ ϏδωεϩδοΫʹ͕ͨͬͯ͠ϧʔςΟϯά͢Ε͹Α͍

  29. 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS

    $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ
  30. 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ

    ஍ਤͷදࣔɹ ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ
  31. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  32. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  33. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  34. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  35. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  36. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  37. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  38. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  39. ϝϯςφϯεϞʔυ͔Ͳ͏ ͔ͷ֬ೝɾ؂ࢹ ڧ੍Ξοϓσʔτͷ֬ೝ ར༻ن໿ͷΞοϓσʔτͷ ֬ೝ ϩάΠϯঢ়ଶͳΒʜʜ Ϣʔβ৘ใͷऔಘ 1VTI௨஌ͷ؂ࢹ Ի੠௨࿩ͷ؂ࢹ ஍ਤͷදࣔɹ

    ϩάΞ΢τঢ়ଶͳΒʜʜ ϩάΠϯը໘΁ભҠ 3PPU -PHHFE*O -PHHFE0VU 'FUDI6TFS 8FMDPNF .BQ 7P*1$BMMJOH.POJUPS 1VTI/PUJpDBUJPO.POJUPS $IFDL'PSDF6QHSBEF .BJOUFOBODF.POJUPS $IFDL5FSNT0G6TF ɾɾɾ ɾɾɾ ɾɾɾ 3*#TπϦʔΛ΋ͱʹϧʔςΟϯάΛߟ͑Δ
  40. 3*#TπϦʔؔ࿈ͷϥΠϒϥϦ IUUQTHJUIVCDPNTSFB3*#T5SFF7JFXFS$MJFOU ϦΞϧλΠϜʹBUUBDI͞Ε͍ͯΔ3PVUFSΛՄࢹԽ

  41. 3*#TπϦʔؔ࿈ͷϥΠϒϥϦ 3*#TπϦʔͷશମ૾Λग़ྗ͢Δ IUUQTHJUIVCDPNJNBJSJ3*#T5SFF.BLFS

  42. ୈࡾষɿ4USFBN

  43. 3*#Tʹ͓͚Δ৘ใڞ༗ 3*#ಉ࢜ͷίϛϡχέʔγϣϯ͸ͲͷΑ͏ʹͯ͠ߦ͑͹Α͍͔

  44. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ઌ૆ͷ3*#ʹ৘ใΛ౉͢ʹ͸ʜ +͔Β਌Ͱ͋Δ'΍ɺͦͷઌ૆Ͱ͋Δ$΍"ʹ৘ใΛ౉͢ʹ͸Ͳ͏͢Ε͹Α͍͔ " ' & % # $ +

    * ) (
  45. " ' & % # $ + * ) (

    3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ਌ͷ3*#΍ͦΕΑΓઌʹ͋Δઌ૆ͷ3*#ʹ৘ใΛ౉͢৔߹ɺ*OUFSBDUPSͷ -JTUFOFSܦ༝Ͱߦ͏͜ͱ͕Ͱ͖Δ Listener Listener Listener
  46. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ࢠͷ3*#ʹ৘ใΛ౉͢ʹ͸ʜ '͔Β+ͳͲ਌͔Βࢠ΁ʢ੩తͳʣ৘ใΛ౉͢ʹ͸Ͳ͏͢Ε͹Α͍͔ " ' & % # $ +

    * ) (
  47. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ࢠͷ3*#͕·ͩੜ੒͞Ε͍ͯͳ͍৔߹͸ɺ#VJMEFSʹΑΔੜ੒࣌ʹ%*͢Δ͜ͱͰ ʢ੩తͳʣ৘ใΛ౉͢͜ͱ͕Ͱ͖Δ " ' & % # $ +

    * ) ( Builder ʹΑΔੜ੒࣌ʹ%*͢Δ
  48. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ͢Ͱʹଘࡏ͢Δࢠͷ3*#ʹʢಈతͳʣ৘ใΛ౉͢ʹ͸ʜʢ'͔Β+ʣ ͢Ͱʹଘࡏ͢Δܑఋ΍਌ੰͷ3*#ʹʢಈతͳʣ৘ใΛ౉͢ʹ͸ʜʢ(͔Β+ʣ " ' & % # $ +

    * ) (
  49. 4USFBN 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ

  50. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ʮ4USFBNʯΛར༻͢Δ͜ͱͰɺͲΜͳ3*#ಉ࢜Ͱ΋৘ใͷڞ༗͕ՄೳʹͳΔ 4USFBNͱ͸ ڞ༗͍ͨ͠৘ใΛอ࣋͢Δߏ଄ମ ৘ใΛڞ༗͍ͨ͠3*#ͱͷڞ௨ͷઌ૆3*#Ͱੜ੒͢Δ shared { … }Ͱ࣮૷͢Δ͜ͱͰಉ͡΋ͷΛڞ༗Ͱ͖Δ ੜ੒͞Εͨ4USFBNΛ3*#ੜ੒࣌ʹ%*͠ɺͦΕͧΕͷ3*#಺Ͱอ࣋͢Δ

    ৘ใͷऔಘ΍ߋ৽͸4USFBNܦ༝Ͱ҆શʹߦ͑Δ
  51. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ ͨͱ͑͹ɺ(ͱ+ͷڞ௨ͷઌ૆͸$ͱͳΔʢ"Ͱ΋Α͍ʣ " ' & % # $ + *

    ) (
  52. 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ " ' & % # $ + * )

    ( ᶃ$3*#ͷ$PNQPOFOUͰ৘ใڞ༗༻ͷ4USFBNΛshared { … }Ͱ࡞੒͢Δ ʢ$3*#഑Լ͸·ͩ࡞੒͞Ε͍ͯͳ͍ʣ 4USFBN
  53. ᶄ$3*#഑Լͷ3*#ੜ੒࣌ʹ%FQFOEFODZͱͯ͠4USFBNΛࢠ3*#ʹ఻ൖͤ͞Δ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ " ' & % # $ + *

    ) ( 4USFBN
  54. ᶅ৘ใڞ༗͍ͨ͠3*#ͷॳظԽ࣌ʹ4USFBNΛ%*͢Δ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ " ' & % # $ + *

    ) ( 4USFBN
  55. ᶆڞ༗͞Εͨ4USFBNΛհͯ͠৘ใͷߋ৽ͱऔಘΛߦ͏ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ " ' & % # $ + *

    ) ( 4USFBN ߋ৽ औಘ
  56. ྫɿ஫จ৘ใΛѻ͏0SEFSΛڞ༗͍ͨ͠ ڞ༗͞Εͨ৘ใΛड͚औΔͨΊͷʮ0SEFS4USFBNʯΛ1SPUPDPMͱͯ͠ఆٛ͢Δ ڞ༗͞Εͨ৘ใΛߋ৽͢ΔͨΊͷʮ.VUBCMF0SEFS4USFBNʯ΋ಉ༷ʹఆٛ͢Δ .VUBCMF0SEFS4USFBN͸0SEFS4USFBNʹ४ڌͤ͞Δ ߋ৽༻ͷ4USFBNͰ΋৘ใΛड͚औΓ͍ͨ͜ͱ͕͋ΔͨΊ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ

  57. ྫɿ஫จ৘ใΛѻ͏0SEFSΛڞ༗͍ͨ͠ .VUBCMF0SEFS4USFBNʹ४ڌͨ͠4USFBNΛ࡞੒͢Δ QSJWBUFͰ৘ใΛอ࣋͢ΔͨΊͷϓϩύςΟΛఆٛ͢Δ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ 0SEFS4USFBNͷ࣮૷ .VUBCMF0SEFS4USFBNͷ࣮૷

  58. ྫɿ஫จ৘ใΛѻ͏0SEFSΛڞ༗͍ͨ͠ ڞ௨ͷઌ૆ͷ3*#Ͱ4USFBNੜ੒͢Δ TIBSFEͰғΉ͜ͱͰಉҰ$PNQPOFOU಺Ͱ͸Ұ౓͚ͩॳظԽ͕ߦΘΕɺҎޙ࠶ར༻͞ΕΔ࢓૊Έ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ

  59. ྫɿ஫จ৘ใΛѻ͏0SEFSΛڞ༗͍ͨ͠ ੜ੒ͨ͠4USFBN͸%FQFOEFODZΛར༻ͯ͠ࢠ3*#΁఻ൖͤ͞Δ ৘ใΛߋ৽͢Δ3*#Ͱ͸ɺ.VUBCMF0SEFS4USFBNͱͯ͠఻ൖ ৘ใΛड৴͢Δ3*#Ͱ͸ɺ0SEFS4USFBNͱͯ͠఻ൖ 3*#Tʹ͓͚Δ৘ใڞ༗ʢͦͷʣ (3*#Ͱ͸৘ใΛߋ৽͢Δ +3*#Ͱ͸৘ใΛड৴͢Δ͚ͩ

  60. 4USFBNΛ࢖͑͹ɺ͢΂ͯͷ3*#ؒͰ৘ใڞ༗͕͔ΜͨΜʹߦ͑Δ ʢ4USFBNͷཚ༻ʹ͸஫ҙʣ 3*#Tʹ͓͚Δ৘ใڞ༗

  61. ୈ࢛ষɿ8PSLGMPX

  62. ಛఆͷ3*#·Ͱ઀ଓ͍ͨ͠ 63-4DIFNFͳͲͰΞϓϦΛىಈͨ͠৔߹ɺ ಛఆͷ3*#·ͰͲͷΑ͏ʹͭͳ͍͚͛ͯ͹Α͍ͷ͔

  63. ಛఆͷ3*#·Ͱ઀ଓ͍ͨ͠ " ' & % # $ + * )

    ( (3*#ΛBUUBDI͍ͨ͠
  64. ಛఆͷ3*#·Ͱ઀ଓ͍ͨ͠ " ' & % # $ + * )

    ( "ˠ$ˠ%ˠ(ͷॱ൪ʹBUUBDI͍ͨ͠ ʢ͜ͷखॱΛ౿·ͳ͚Ε͹(3*#͸BUUBDIͰ͖ͳ͍ʣ
  65. ಛఆͷ3*#·Ͱ઀ଓ͍ͨ͠ ͋Δ3*#ΛBUUBDI͢ΔʢͰ͖Δʣ·Ͱʹ༷ʑͳॲཧ͕ଘࡏ͢Δ -PHHFE*O3*#ΛBUUBDI͢Δʹ͸ϩάΠϯॲཧ͕ඞཁ ϩάΠϯޙ͸Ϣʔβͷ৘ใΛऔಘ͢Δ·Ͱ଴ػ͠ͳ͚Ε͹ͳΒͳ͍ ΠϨΪϡϥʔͳ޻ఔ͕ࠩ͠ࠐ·ΕΔ৔߹΋͋Δ ֤छύʔϛογϣϯͷڐՄΛଅ͢ը໘ ΩϟϯϖʔϯͳͲͷ͓஌Βͤ

  66. 8PSLGMPX͸ಛఆͷ3*#·ͰͷBUUBDIΛࣗಈతʹߦ͑Δ࢓૊Έ ʢ3*#Tͷ࢓૊ΈΛ׆͔ͯ͠ɺͻͱखؒՃ͑Δ͚ͩͰ0,ʣ 63-4DIFNFͰىಈͨ͠ͱ͖ͳͲʹར༻Ͱ͖Δ Ϣʔβ͕͋ΔΞΫγϣϯΛߦͬͨΓɺಛఆͷॲཧ͕ऴΘΔ·Ͱ଴ػͤ͞Δ͜ͱ͕Ͱ͖Δ 8PSLGMPXͱ͸

  67. 8PSLGMPXͱ͸ ΫʔϙϯϦετΛ։͘·ͰͷྲྀΕΛ8PSLGMPXͰදݱͰ͖Δ ϩάΠϯ͞ΕΔ·Ͱ଴ͭˠϢʔβ৘ใͷऔಘ׬ྃ·Ͱ଴ͭˠΫʔϙϯϦετΛ։͘

  68. 8PSLGMPXͱ͸ 8PSLGMPXΛ࢖ͬͯɺ͋ΔॲཧΛൃಈͤ͞Δ·ͰͷྲྀΕΛهड़͢Δ ్தͰܦ༝͢Δ3*#ͷ*OUFSBDUPSʹɺ8PSLGMPX༻ͷ1SPUPDPMΛ४ڌͤ͞Δ ͦͷ1SPUPDPMΛհͯ͠8PSLGMPXͰͷॲཧ͕੒ཱ͢Δ 6CFSͷྫͰ͸ʮ"DUJPOBCMF*UFNʯͱ͍͏໊લͰఆٛ͞Ε͍ͯΔ جຊతʹ͸ɺطଘͷ࣮૷ʹ্هͷ8PSLGMPX༻ͷॲཧΛগ͠௥Ճ͢Δ͚ͩͰ0, 63-4DIFNFͷ࣮૷͸ಠࣗͷελΠϧʹͳΓ͕ͪͳͷͰɺ͜͏͍ͬͨ࢓૊Έ͕͋Δ ͱ౷Ұײ͕͋ͬͯΑ͍ͷ͔΋͠Εͳ͍

  69. ͓ΘΓʹ

  70. 3*#TಋೖޙͷޮՌ ϏδωεϩδοΫΛࡉ෼Խ࣮ͯ͠૷Ͱ͖ΔΑ͏ʹͳͬͨ 3*#T 3PVUFSฏۉߦɺ*OUFSBDUPSฏۉߦɺ#VJMEFSฏۉߦ 7JFX$POUSPMMFSฏۉߦʢίʔυϨΠΞ΢τؚΉʣ 7JFXʹґଘ͠ͳ͍ઃܭ΍࣮૷͕࣮ݱ͞Εͨ ࡉ෼Խ͞Εͨ3*#͸ଞͷ৔ॴͰ΋࠶ར༻Մೳʢ%3:ʣ

  71. 3*#TಋೖޙͷޮՌ ෳ਺ਓ։ൃ͕͠΍͘͢ͳͬͨ ґଘؔ܎͕ՄࢹԽ͞Εͯ෼͔Γ΍͍͢ ίϯϑϦΫτ͕࠷খݶʹͳΔʢ༧ଌՄೳͳίϯϑϦΫτʹͳΔʣ %*͕͖ͪΜͱߦ͑ΔͷͰ6OJU5FTU΋͔͖΍͍͢ 3PVUFS *OUFSBDUPSͷςετ͕༰қʹ͔͚Δ ʢJ04"OESPJEͷઃܭΛ౷Ұ͢Δ͜ͱ͕Ͱ͖Δʣ

  72. 3*#Tͷಋೖखॱ ݱࡏͷΞʔΩςΫνϟ͔Β3*#T΁੾Γସ͍͑ͨʜʜʂ 3*#T͸෦෼తͳಋೖ͕Մೳ 3PPU "QQ%FMFHBUF ͔Βͷஔ͖׵͕͑ཧ૝͕ͩɺ్த͔ΒͰ΋Մೳ ΞϓϦશମΛ3*#TͰ౷Ұ͢Δ΄͏͕ޮՌ͸େ͖͘ͳΔ ͳΜͪΌͬͯ3*#ԽʢΨϫ3*#ʣͰπϦʔߏ଄͚ͩΛઌʹ࡞Δͷ΋͋Γ 3*#T͸3PVUFSʹΑΔϧʔςΟϯά͕؊ͳͷͰ͚ͦͩ͜Λ·ͣ͸͖ͪΜͱ࡞ ΓɺϏδωεϩδοΫ΍7JFX·ΘΓΛޙճ͠ʹ͢Δ͜ͱ΋Մೳ

    Ψϫ3*#ঢ়ଶΛܧଓͯ͠͠·͏ͱɺࠓޙͷ։ൃʹӨڹ͕͋ΔͷͰ஫ҙ ΞϓϦͷ࢓༷Λ੔ཧɾ೺Ѳ͠ɺ3*#πϦʔΛඳ͖࢝ΊΔͱ͜Ζ͔Βελʔτ αʔϏεͷকདྷతͳల๬΋ݟਾ͑ͨઃܭʹͰ͖ΔͱΑ͍
  73. 2"

  74. None
  75. ͓·͚

  76. #VJMEFSTXJGUͷ࣮૷ ͜ͷ3*#಺Ͱར༻͢Δ΋ͷΛఆٛ͢Δ %FQFOEFODZͰఆٛ͞Εͨ΋ͷ͸ɺجຊతʹ ಉϑΝΠϧ಺ͷ$PNQPOFOU಺Ͱར༻͞ΕΔ ࢠ3*#ͱͷґଘੑղܾ༻ͷ %FQFOEFODZΛ४ڌ͓ͤͯ͘͞

  77. #VJMEFSTXJGUͷ࣮૷ ॳظԽ࣌ʹ%*͍ͨ͠΋ͷΛҾ਺ͱͯ͠ఆٛ͢Δ ࢠ3*#ͷ#VJMEFSΛ࡞੒͠ɺ 3PVUFS΁౉͓ͯ͘͠

  78. $PNQPOFOU 999TXJGUͷ࣮૷ ਌ͷ਌ɺͦΕΑΓ্ͷ3*#͔ΒґଘΛ͖͍࣋ͬͯͨͱ͖͸͜ͷ1SPUPDPMΛར༻͢Δ ผϑΝΠϧͰ෼཭ͯ͠ఆٛ͞ΕΔ͜ͱͰɺຊདྷͷ#VJMEFS಺Ͱར༻͢Δ%FQFOEFODZͱ ۠ผ͢Δ͜ͱ͕Ͱ͖Δʢݟ௨͕͠Α͘ͳΔʣ ʮ਌3*#໊ %FQFOEFODZ ࢠ3*#໊ʯͰදݱ͞ΕΔ

  79. *OUFSBDUPSTXJGUͷ࣮૷ 3PVUFS΁ͷ໋ྩΛهड़͢Δ 1SFTFOUFS΁ͷ໋ྩΛهड़͢Δ ਌ͷ*OUFSBDUPS΁ͷ໋ྩΛهड़͢Δ

  80. *OUFSBDUPSTXJGUͷ࣮૷ 4USFBNͳͲඞཁͳ৘ใΛ%*͢Δ 3PVUFS͕BUUBDI͞Εͨ௚ޙʹݺ͹ΕΔ 3PVUFS͕EFUBDI͞ΕΔ௚લʹݺ͹ΕΔ %JTQPTBCMF͸EFUBDI͞ΕΔͱഁغ͞ΕΔ

  81. *OUFSBDUPSTXJGUͷ࣮૷ 1SFTFOUFS͔Βͷ໋ྩΛड͚औΔ

  82. 7JFX$POUSPMMFSTXJGUͷ࣮૷ *OUFSBDUPS΁ͷ໋ྩΛఆٛ͢Δ

  83. 7JFX$POUSPMMFSTXJGUͷ࣮૷ ίʔυʹΑΔϨΠΞ΢τ 6*͔ΒͷΠϕϯτΛऔಘ͠ɺͦͷޙͷॲཧΛ *OUFSBDUPSʹҕৡ͢Δ

  84. 7JFX$POUSPMMFSTXJGUͷ࣮૷ *OUFSBDUPS͔Βͷ໋ྩΛड͚औΔ

  85. 3PVUFSTXJGUͷ࣮૷ 3PVUFS͔Β7JFX$POUSPMMFSʹରͯ͠ߦ͍͍ͨॲཧΛهड़ ओʹɺ6*·ΘΓͷϨΠΞ΢τௐ੔΍ը໘දࣔͳͲͷϧʔςΟϯά࣌ʹඞཁͳॲཧ ࢠ3*#ͷ-JTUFSOFS1SPUPDPMʹ४ڌ͓ͤͯ͘͜͞ͱͰɺ ࢠ*OUFSBDUPS͔Β਌*OUFSBDUPS΁ͷίϛϡχέʔγϣϯ͕ՄೳʹͳΔ

  86. 3PVUFSTXJGUͷ࣮૷ 3PVUFSͷॳظԽ࣌ʹࢠ3*#ͷ#VJMEFSΛ%*͢Δඞཁ͋Γ

  87. 3PVUFSTXJGUͷ࣮૷ *OUFSBDUPS͔Βͷ໋ྩΛड͚औ Δ ॳظԽ࣌ʹอ͓͍࣋ͯͨ͠ࢠ3*#ͷ#VJMEFS Λར༻ͯ͠ࢠ3*#ͷ3PVUFSΛऔಘ͢Δ BUUBDI$IJMEͰBDUJWFঢ়ଶʹͳΔ ʢ*OUFSBDUPSͷॲཧ͕࢝·Δʣ 7JFX$POUSPMMFSΛදࣔͤ͞Δ EFUBDIॲཧ࣌ʹඞཁͳͨΊɺ XFBLͰอ͓࣋ͯ͘͠