実践!「みてね」における自動生成活用例
by
shunsuke sato
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
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ͬͯͦͦԿʁ 5BHTGPSJGͳͲͷ੍ޚߏจ
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
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠!!!