Slide 1

Slide 1 text

࣮ફʂʮΈͯͶʯʹ͓͚Δࣗಈੜ੒׆༻ྫ !J04%$+BQBO

Slide 2

Slide 2 text

ࣗݾ঺հ • ໊લ: ࠤ౻ढ़ี • TwitterͳͲ: @ushisantoasobu • ॴଐ: ʢגʣϛΫγΟ ΈͯͶࣄۀ෦ • ։ൃ: iOSΛϝΠϯʹɺAndroid / Rails ͳͲ • झຯ: αοΧʔʢϑοταϧʣͱ ίʔώʔ

Slide 3

Slide 3 text

ʮΈͯͶʯͱ͸ʁ • ʮՈ଒ΞϧόϜ ΈͯͶʯʢ ւ֎Ͱ͸ʮFamilyAlbumʯʣ • ࢠڙͷࣸਅ΍ಈըΛɺՈ଒಺Ͱڞ༗͢ΔΞϓϦ • ΈͯͶͷiOSΞϓϦʹ͍ͭͯ • ։ൃ։͔࢝Β7೥໨ • ʮεϐʔυ༏ઌ < ಺෦తͳ࣭ʯͳ։ൃϑΣʔζ

Slide 4

Slide 4 text

ΞδΣϯμ • ʮࣗಈੜ੒ʯʹڵຯΛ͖͔͚࣋ͬͨͬ • ͜ͷτʔΫͰѻ͏ʮࣗಈੜ੒ʯͱ͸ • ΈͯͶʹ͓͚Δࣗಈੜ੒׆༻ྫ 3ͭ • Sourcery / Stencil ͷجຊతͳ࿩ • Sourcery / Stencil ͷTIPS • ࣗಈੜ੒Λ1೥ӡ༻ͯ͠Έͯͷॴײ • ·ͱΊ

Slide 5

Slide 5 text

ʮࣗಈੜ੒ʯʹڵຯΛ͖͔͚࣋ͬͨͬ IUUQTXXXZPVUVCFDPNXBUDI W5LHG0C6

Slide 6

Slide 6 text

ʮࣗಈੜ੒ʯʹڵຯΛ͖͔͚࣋ͬͨͬ • UIKonf 2019 ͰͷUberͷΤϯδχΞͷํʹΑΔࣗಈੜ੒ʢ”Mockolo”ʣʹ͍ͭͯͷൃද • UberͰ͸શͯͷϓϩμΫτͰܭ230ສߦ΄Ͳͷίʔυϕʔε • ͦͷ͏ͪ൒෼͸ʮࣗಈੜ੒ʯ͞Εͨ΋ͷ

Slide 7

Slide 7 text

ʮࣗಈੜ੒ʯʹڵຯΛ͖͔͚࣋ͬͨͬ • UIKonf 2019 ͰͷUberͷΤϯδχΞͷํʹΑΔࣗಈੜ੒ʢ”Mockolo”ʣʹ͍ͭͯͷൃද • UberͰ͸શͯͷϓϩμΫτͰܭ230ສߦ΄Ͳͷίʔυϕʔε • ͦͷ͏ͪ൒෼͸ʮࣗಈੜ੒ʯ͞Εͨ΋ͷ

Slide 8

Slide 8 text

͜ͷτʔΫͰѻ͏ʮࣗಈੜ੒ʯͱ͸ • Ϧιʔε·ΘΓΛλΠϓηʔϑͳSwiftͷίʔυͱͯࣗ͠ಈੜ੒͢Δ΋ͷ • RSwift, SwiftGenͳͲ • ίʔυΛॻ͖͸͡ΊΔ͏͑ͰͷςϯϓϨʔτࣗಈੜ੒ • ෳࡶͳΞʔΩςΫνϟͷಋೖ͕ҰൠతʹͳΔʹͭΕɺधཁ͕ߴ·͍ͬͯΔʁ • ʮ͋ΔίʔυΛ΋ͱʹɺผͷίʔυΛੜ੒͢Δʯʢϝλϓϩάϥϛϯάʣ • Sourcery / Stencil ͳͲΛར༻͢Δ

Slide 9

Slide 9 text

• Ϧιʔε·ΘΓΛλΠϓηʔϑͳSwiftͷίʔυͱͯࣗ͠ಈੜ੒͢Δ΋ͷ • RSwift, SwiftGenͳͲ • ίʔυΛॻ͖͸͡ΊΔ͏͑ͰͷςϯϓϨʔτࣗಈੜ੒ • ෳࡶͳΞʔΩςΫνϟͷಋೖ͕ҰൠతʹͳΔʹͭΕɺधཁ͕ߴ·͍ͬͯΔʁ • ʮ͋ΔίʔυΛ΋ͱʹɺผͷίʔυΛੜ੒͢Δʯʢϝλϓϩάϥϛϯάʣ • Sourcery / Stencil ͳͲΛར༻͢Δ ͜ͷτʔΫͰѻ͏ʮࣗಈੜ੒ʯͱ͸

Slide 10

Slide 10 text

ΈͯͶʹ͓͚Δࣗಈੜ੒׆༻ྫͭ • 1. ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου • 2. DIͷґଘؔ܎ղܾ • 3. ϞοΫ

Slide 11

Slide 11 text

ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου • [લఏ] • ΈͯͶͰ͸GUIΞʔΩςΫνϟʹMVPΛ࠾༻͍ͯ͠Δ • ςετΛॻ͍͍ͯΔ

Slide 12

Slide 12 text

͜ͷΑ͏ͳQSFTFOUFSͷςετΛॻ͍͍ͯΔ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 13

Slide 13 text

ελϒ͕ฦ͢஋Ληοτ͢Δ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 14

Slide 14 text

ςετର৅ͷϝιουΛ࣮ߦ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 15

Slide 15 text

ϞοΫʢzWJFXzʣ͕ਖ਼͍͠ڍಈΛ͍ͯ͠Δ͜ͱΛ֬ೝ͢Δ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 16

Slide 16 text

ʮελϒ͕ฦ͢஋ʯͱ͸ʁ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 17

Slide 17 text

ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 18

Slide 18 text

͜͜Λॻ͘ͷ͕खؒͱ͍͏՝୊͕νʔϜ಺Ͱ͋ͬͨ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 19

Slide 19 text

"TTFSU͍ͯ͠Δͷ͸zJEz͚ͩ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 20

Slide 20 text

֤Entityʹରͯ͠ ʮͦΕͧΕͷܕʹରԠͨ͠”ͦΕΆ͍”σϑΥϧτҾ਺Λ࣋ͭϏϧμʔϝιουʯΛ ςετλʔήοτʹextensionͱͯࣗ͠ಈੜ੒͢Δ ͱ͍͏ΞΠσΞΛࢥ͍ͭ͘ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 21

Slide 21 text

͜ͷΑ͏ͳ&OUJUZʹରͯ͠ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 22

Slide 22 text

͜ͷΑ͏ͳ΋ͷϏϧμʔϝιουΛࣗಈੜ੒͢Δ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 23

Slide 23 text

ʮͦΕͧΕͷܕʹରԠͨ͠zͦΕΆ͍zσϑΥϧτҾ਺Λ࣋ͭϏϧμʔϝιουʯ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 24

Slide 24 text

͖͞΄Ͳͷςετ͕͜ͷΑ͏ʹεοΩϦॻ͚Δ ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου

Slide 25

Slide 25 text

%*ͷґଘؔ܎ղܾ • [લఏ] • γεςϜΞʔΩςΫνϟʹCleanArchitectureΛ࠾༻͍ͯ͠Δ • ґଘ͢Δ΋ͷ͸DI͍ͯ͠Δ • ґଘؔ܎ղܾͷॲཧ͸ɺखͰΰϦΰϦॻ͍͍ͯͨ • ʢҎલ͸αʔυύʔςΟͷϥΠϰϥϦΛར༻͍ͯͨ͠ɻ͜͜Β΁ΜͷܦҢʹ͍ͭͯ͸ޙड़ʣ

Slide 26

Slide 26 text

IUUQTTQFBLFSEFDLDPNKTTF[IPXUPNBOBHFEJXJUIPVUVTJOHFYUFSOBMMJCSBSZJOTXJGU %*ͷґଘؔ܎ղܾ

Slide 27

Slide 27 text

͜ͷΑ͏ͳґଘؔ܎ղܾͷίʔυΛɺ͜Ε·Ͱ͸ʮखͰΰϦΰϦॻ͍͍ͯͨʯ͕ ࠓ͸ʮࣗಈੜ੒ʯ͞ΕΔΑ͏ʹͳͬͨ %*ͷґଘؔ܎ղܾ

Slide 28

Slide 28 text

ͦΕͧΕ%*͢Δ΋ͷʢϓϩτίϧʣʹରͯ͠ %*ͷґଘؔ܎ղܾ

Slide 29

Slide 29 text

ͦͷ࣮ମΛฦ͢ϑΝΫτϦʔϝιου %*ͷґଘؔ܎ղܾ

Slide 30

Slide 30 text

ϞοΫ • [લఏ] • DIಉ༷ɺϞοΫ͸ʮखͰΰϦΰϦʯॻ͍͍͔ͯͨ
 ”SwiftMockGeneratorForXcode”ʢXcode extensionʣΛར༻͍ͯͨ͠

Slide 31

Slide 31 text

4XJGU.PDL(FOFSBUPS'PS9DPEFͱಉ͡Α͏ͳ*'ͷ΋ͷΛࣗಈੜ੒ͯ͠Έͨ ϞοΫ

Slide 32

Slide 32 text

• ʢ͜ͷτʔΫ͕࠾୒͞Ε͔ͯΒɺSourcery / Stencil ͷ෮श͕ͯΒ΍ͬͯΈͨʣ • -> ·ͩӡ༻࢝͠Ίͨ͹͔Γ • ϞοΫͷࣗಈੜ੒ΛͪΌΜͱ΍Ζ͏ͱࢥͬͨΒ݁ߏ೉͔ͬͨ͠ • ʮࣗಈੜ੒ΛͲ͜·Ͱ΍Γ͖Δ͔ʯ͸ॏཁͳϙΠϯτͱೝࣝɻޙड़͢Δ ϞοΫ

Slide 33

Slide 33 text

ΈͯͶʹ͓͚Δࣗಈੜ੒׆༻ྫσϞΞϓϦ https://github.com/ushisantoasobu/iosdc-2020-demo

Slide 34

Slide 34 text

Sourcery / Stencil ͷجຊతͳઆ໌

Slide 35

Slide 35 text

4PVSDFSZͬͯͦ΋ͦ΋Կʁ • SwiftͰʮ͋Δίʔυ͔ΒɺผͷίʔυΛੜ੒͢ΔʯʢϝλϓϩάϥϛϯάʣͨΊͷϥΠϒϥϦ • https://github.com/krzysztofzablocki/Sourcery • ʮ͋Δίʔυ͔ΒɺผͷίʔυΛੜ੒͢Δʯ= ҎԼͷ2ͭͷϥΠϒϥϦʹґଘ͍ͯ͠Δ • ίʔυͷղੳ -> SourceKittenʢSourceKitʣ • ςϯϓϨʔτΤϯδϯ -> Stencil

Slide 36

Slide 36 text

4UFODJMͬͯͦ΋ͦ΋Կʁ • ςϯϓϨʔτΤϯδϯ • https://github.com/stencilproject/Stencil • ʢREADMEΑΓʣSwiftGen, Kitura, Weaver, Genesis ͳͲͰར༻͞Ε͍͍ͯΔ • Variables / Filters / Tags ʢҎ߱ͷϖʔδͰઆ໌ʣ

Slide 37

Slide 37 text

4UFODJMͬͯͦ΋ͦ΋Կʁ ςϯϓϨʔτϑΝΠϧͷݟͨ໨͸͜Μͳײ͡

Slide 38

Slide 38 text

4UFODJMͬͯͦ΋ͦ΋Կʁ 7BSJBCMFTදࣔ͢Δม਺

Slide 39

Slide 39 text

4UFODJMͬͯͦ΋ͦ΋Կʁ 5BHTGPS΍JGͳͲͷ੍ޚߏจ

Slide 40

Slide 40 text

4UFODJMͬͯͦ΋ͦ΋Կʁ 'JMUFSTม਺Λʮม׵͢Δʯ΋ͷ

Slide 41

Slide 41 text

4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 42

Slide 42 text

XcodeͰϓϩδΣΫτ࡞ͬͯɺSourcery͸ΠϯετʔϧࡁΈͷͱ͜Ζ͔Βελʔτ ʢΠϯετʔϧʹ͍ͭͯ͸লུɻ͜͜Ͱ͸cocoapodsͰΠϯετʔϧʣ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 43

Slide 43 text

l)PHFzl'VHBzͱ͍͏໊લͷͭͷTUSVDU͕ɺz&OUJUZzσΟϨΫτϦʹ͋Δͱ͢Δ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 44

Slide 44 text

͜ͷΑ͏ͳςϯϓϨʔτʢTUFODJMϑΝΠϧʣΛॻ͍ͯΈΔ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 45

Slide 45 text

શͯͷzTUSVDUzʹରͯ͠GPSϧʔϓΛճ͢ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 46

Slide 46 text

zTUSVDUzͷ໊લΛग़ྗ͢Δ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 47

Slide 47 text

TPVSDFSZίϚϯυΛ࣮ߦ͢Δ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 48

Slide 48 text

lTPVSDFTzҾ਺͸ࣗಈੜ੒ର৅ϑΝΠϧؚ͕·ΕΔσΟϨΫτϦΛࢦఆ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 49

Slide 49 text

lUFNQMBUFTzҾ਺͸ςϯϓϨʔτϑΝΠϧΛࢦఆ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 50

Slide 50 text

lPVUQVUzҾ਺Ͱࣗಈੜ੒͢ΔϑΝΠϧͷग़ྗઌΛࢦఆ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 51

Slide 51 text

ͦΕͧΕͷTUSVDUͷ໊લ͕ग़ྗ͞ΕͨϑΝΠϧ͕ࣗಈੜ੒͞Εͨ 4PVSDFSZ4UFODJMΛ࢖ͬͨࣗಈੜ੒ͷୈҰา

Slide 52

Slide 52 text

ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 53

Slide 53 text

͜ͷΑ͏ͳ΋ͷΛࣗಈੜ੒͢Δʹ͸ͲͷΑ͏ͳςϯϓϨʔτϑΝΠϧΛॻ͘ඞཁ͕͋Δʁ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 54

Slide 54 text

ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 55

Slide 55 text

શͯͷTUSVDUΛGPSϧʔϓͰճͯ͠ɺϏϧμʔϝιουΛੜ΍͢ʢ͜͜Β΁Μ͸ൺֱతγϯϓϧͳͷͰলུʣ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 56

Slide 56 text

ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 57

Slide 57 text

TUSVDUͷશͯͷม਺ͰGPSϧʔϓͰճ͢ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 58

Slide 58 text

ΦϓγϣφϧͳΒσϑΥϧτҾ਺ͷ஋ΛzOJMzͱग़ྗ͢Δ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 59

Slide 59 text

Ұൠతͳܕʹ͍ͭͯ͸ɺͦΕͧΕʹରԠͨ͠ʮͦΕΆ͍ʯ஋ΛσϑΥϧτҾ਺ͷ஋ͱͯ͠ग़ྗ͢Δ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 60

Slide 60 text

&OVNʹ͍ͭͯ͸࠷ॳͷ஋ΛσϑΥϧτҾ਺ͷ஋ͱͯ͠ग़ྗ͢Δɻ ͨͩ͠"TTPDJBUFE7BMVFΛ΋ͭ஋ʹରͯ͠͸͏·ࣗ͘ಈੜ੒͢Δͷ͕೉͔ͬͨ͠ͷͰɺ࣍ͷʮ௚ॻ͖ʯͰճආ͢ΔΑ͏ʹͨ͠ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 61

Slide 61 text

ࣗಈੜ੒͕೉͍͠΋ͷʹ͍ͭͯ͸ɺσϑΥϧτҾ਺ͷ஋Λʮ௚ॻ͖ʯͯ͠ग़ྗ͢Δ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 62

Slide 62 text

Πέςͳ͍ʁͰ΋ࣗಈੜ੒͸ʮࣗ෼ͨͪͰίϯτϩʔϧͰ͖Δʯ෦෼͕ൺֱతଟ͍ͷͰ దٓճආࡦ͕ݟ͚ͭ΍͍͢ϝϦοτͰ΋͋Δͱೝ͍ࣝͯ͠Δ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 63

Slide 63 text

ͦΕҎ֎͸ผͷ&OUJUZͷ͸ͣͳͷͰɺͦΕΒʹ͍ͭͯ͸σϑΥϧτҾ਺ͷ஋ͱͯͦ͠ͷ&OUJUZͷϏϧμʔϝιουΛग़ྗ͢Δ ʮʮελϒ͕ฦ͢஋ʯͷศརʙʯͷςϯϓϨʔτΛோΊͯΈΔ

Slide 64

Slide 64 text

4PVSDFSZ4UFODJMิ଍ • ઌ΄Ͳ͸SourceryͷCLIΛར༻ͯࣗ͠ಈੜ੒Λߦͳ͕ͬͨɺ࣮ࡍʹӡ༻͢Δࡍ͸
 ʮ”Run Script”ʹίϚϯυΛهड़ͯ͠Ϗϧυຖʹ࣮ߦʯͱͳΔ͸ͣ • “sources” / “templates” / “output” ͳͲͷҾ਺͸”.sourcery.yml”ʹ·ͱΊΔ͜ͱ͕Ͱ͖Δ • ΈͯͶͰ͸ग़ྗઌ͕ෳ਺ʢΞϓϦ/ςετʣඞཁͷͨΊ”.sourcery.yml”͸࢖͑ͳ͍ • ࢀߟ -> https://github.com/krzysztofzablocki/Sourcery/issues/727

Slide 65

Slide 65 text

Sourcery / Stencil Λ׆༻͢Δ͏͑ͰͷTIPS

Slide 66

Slide 66 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ

Slide 67

Slide 67 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ ྫ͑͹͜ͷzTUSVDUz͔ΒɺଞʹͲΜͳ஋Λࢀর͢Δ͜ͱ͕Ͱ͖Δͷʁ

Slide 68

Slide 68 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ

Slide 69

Slide 69 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ lLJOEzϓϩύςΟ͔͠ͳ͍ʁ

Slide 70

Slide 70 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ l5ZQFzͱ͍͏ΫϥεΛܧঝ͍ͯ͠Δ

Slide 71

Slide 71 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ lOBNFzlBMM7BSJBCMFTzlBMM.FUIPETzͳͲͷʮྑ͘࢖͍ͦ͏ͳʯϓϩύςΟ͕͋Δ

Slide 72

Slide 72 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ 1. ࣗಈੜ੒͍ͨ͠΋ͷΛΠϝʔδ͢ΔʢPlanʣ 2. υΩϡϝϯτΈͭͭɺͱΓ͋͑ͣࣗಈੜ੒ͯ͠ΈΔʢDoʣ 3. ࣗಈੜ੒͞Εͨ΋ͷΛ֬ೝ͢ΔʢCheckʣ 4. Πϝʔδ͍ͯͨ͠΋ͷ͕ਖ਼͘͠ੜ੒͞Ε͍ͯͳ͔ͬͨͷͰɺ࠶౓υΩϡϝϯτݟ௚͢ʢActionʣ • PDCAαΠΫϧΛճ͍ͯ͘͠ײ͡ʹͳΔ͸ͣ

Slide 73

Slide 73 text

υΩϡϝϯτͱᛀΊͬ͜͢Δඞཁ͕͋Δ • Sourcery -> https://cdn.rawgit.com/krzysztofzablocki/Sourcery/master/docs/index.html • Stencil -> https://stencil.fuller.li/en/latest/

Slide 74

Slide 74 text

4UFODJM4XJGU,JUΛ஌͓ͬͯ͘ • https://github.com/SwiftGen/StencilSwiftKit • Stencilͷ֦ுػೳΈ͍ͨͳ΋ͷ • Stenicilͷඪ४ػೳ͚ͩͰ͸࣮ݱͰ͖ͳ͍΋ͷΛ࣮ݱͰ͖Δ • Stenicilͷඪ४ػೳ͚ͩͰ͸࣮ݱ͢Δͷ͕େมͳ΋ͷΛ؆୯ʹ࣮ݱͰ͖Δ • SourceryͷREADMEʹ͸Ұ੾هड़͕ͳ͍͕ɺSourcery͔Βར༻Ͱ͖Δ • ͪ͜Β΋υΩϡϝϯτΈͯɺར༻Ͱ͖ΔػೳΛ೺Ѳ͓ͯ͘͠ͱྑ͍

Slide 75

Slide 75 text

• ಛʹ”macro”͸ศར • ଞʹ΋ศརͳ΋ͷ͕ͨ͘͞Μ͋Δ • “Map”ͱ͍͏tag΍ɺ”hasPrefix”ͱ͍͏filter͸ΈͯͶͰ͸ར༻͍ͯ͠Δ 4UFODJM4XJGU,JUΛ஌͓ͬͯ͘

Slide 76

Slide 76 text

NBDSPͷྫ 4UFODJM4XJGU,JUΛ஌͓ͬͯ͘

Slide 77

Slide 77 text

Ұ෦ͷςϯϓϨʔτΛNBDSPͱͯ͠ఆٛͰ͖Δ 4UFODJM4XJGU,JUΛ஌͓ͬͯ͘

Slide 78

Slide 78 text

NBDSPΛผͷ৔ॴ͔Βݺͼग़͢͜ͱ͕Ͱ͖Δɻ ςϯϓϨʔτΤϯδϯͷՄಡੑΛ͋͛ͨΓɺಉ͡Α͏ͳςϯϓϨʔτΛॻ͘͜ͱΛආ͚Δ͜ͱ͕Ͱ͖Δ 4UFODJM4XJGU,JUΛ஌͓ͬͯ͘

Slide 79

Slide 79 text

4PVSDFSZͷʮαϯϓϧूʯΛࢀߟʹ͢Δ IUUQTHJUIVCDPNLS[ZT[UPG[BCMPDLJ4PVSDFSZUSFFNBTUFS5FNQMBUFT5FNQMBUFT

Slide 80

Slide 80 text

ࣗಈੜ੒ΛͲ͜·Ͱ࢓্͛Δ΂͖͔ • ࣗಈੜ੒Λߦ͏্Ͱɺ࣮ݱ͢Δͷ͕Ͳ͏ͯ͠΋೉͍͠ίʔφʔέʔε͕Ͱ͖ͯͨͱ͖ • ͋·ΓʮؤுΓ͗͢ͳ͍ʯ͜ͱ • ʮϝϯςͰ͖ͳ͍ʯςϯϓϨʔτϑΝΠϧ͸࡞Γͨ͘ͳ͍ • νʔϜͰӡ༻Ͱ͖Δ͜ͱ͕ॏཁ • ճආࡦ͸͋Δ • ςϯϓϨʔτଆͰճආ͢Δ -> ྫ) ʮελϒ͕ฦ͢஋ʯͷศརϏϧμʔϝιου • ࣗಈੜ੒ͷର৅͔Β֎͢ʢͦΕΒ͸खͰॻ͘ʣ

Slide 81

Slide 81 text

• ࣗಈੜ੒ͷର৅͔Β֎͢ = ର৅ϑΝΠϧΛʮࡉ͔͘ʯద༻͢Δ͜ͱ΋Ͱ͖Δ • બ୒ύλʔϯ • ઐ༻ͷprotocolΛ࡞੒͠ద༻͢ΔʢͦͷprotocolΛࣗಈੜ੒ର৅ͷ໨ҹͱ͢Δʣ • আ֎ύλʔϯ • ʢҰൠతͰ͸ͳ͍͕ɺΈͯͶͰ͸ͪ͜ΒͰӡ༻͍ͯ͠Δʣ • আ֎͢Δ class/struct/protocolʢͳͲʣ ໊ΛςϯϓϨʔτϑΝΠϧʹʮϕλॻ͖ʯͯ͠ɺif จͳͲͰআ֎͢Δ ࣗಈੜ੒ΛͲ͜·Ͱ࢓্͛Δ΂͖͔

Slide 82

Slide 82 text

ࡶʹ࣮૷ɺͦͷ͋ͱϦϑΝΫλϦϯά 1. ͪΐͬͱԚ͍͕ɺ໨త௨Γͷ΋ͷ͕ࣗಈੜ੒͞ΕΔςϯϓϨʔτΛॻ͘ 2. Ұ୴ίϛοτ 3. ϦϑΝΫλ͠ͳ͕Β౎౓ࣗಈੜ੒ -> ࣗಈੜ੒͞ΕΔ΋ͷʹࠩ෼͕ͳ͚Ε͹OK • ʢςετ͕͋Δ͔Β҆৺ͯ͠ϦϑΝΫλͰ͖ΔͷͱࣅͯΔʣ

Slide 83

Slide 83 text

1೥ؒӡ༻ͯ͠ΈͯͷॴײͳͲ

Slide 84

Slide 84 text

ಛʹେ͖ͳ໰୊͸ى͖ͨ͜ͱ͕ͳ͍ • ઌड़ͨ͠ͱ͓ΓɺҎԼͷΑ͏ͳ͜ͱ͕Ͱ͖ΔͨΊ • ςϯϓϨʔτʹԿ͔͠ΒखΛೖΕͯճආ • ࣗಈੜ੒ͷର৅͔Β֎͢

Slide 85

Slide 85 text

ࣗಈੜ੒WTϥΠϒϥϦʁ • DIͱ͔ϞοΫ͸ʮαʔυύʔςΟͷϥΠϒϥϦΛ࢖͑͹ྑ͍ͷͰ͸ʁʯͱࢥͬͨํ΋ଟ͍͸ͣ

Slide 86

Slide 86 text

• ϥΠϒϥϦͷ؅ཧίετ͸ҙ֎ʹߴ͍ • ࠷৽ͷόʔδϣϯʹ௥ै͢Δίετ • ສ͕Ұಈ͔ͳ͘ͳͬͨͱ͖/ෆ۩߹͕ग़ͨͱ͖ͷରԠίετ • ՝୊ղܾ͢Δ͏͑ͰɺαʔυύʔςΟͷϥΠϒϥϦΛར༻͢Δͱ͍͏બ୒ࢶͱಉ౳ʹʮࣗಈੜ ੒ʯΛར༻͢Δͱ͍͏બ୒ࢶ΋ฒ΂ͯྑ͍ͷͰ͸ ࣗಈੜ੒WTϥΠϒϥϦʁ

Slide 87

Slide 87 text

·ͱΊ

Slide 88

Slide 88 text

·ͱΊ • ՝୊ղܾͷ1ͭͱͯ͠ʮࣗಈੜ੒ʯΛݕ౼ʹೖΕͯΈͯ͸Ͳ͏͔ • ࣗಈੜ੒ΛͲ͜·Ͱ΍Γ੾Δ͔͸ҙࣝ͢Δͱྑͦ͞͏

Slide 89

Slide 89 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠!!!