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

知らないWebアプリケーションの開発に途中からJOINしたとき、どこから切り込むか? / PHPerKaigi 2020

知らないWebアプリケーションの開発に途中からJOINしたとき、どこから切り込むか? / PHPerKaigi 2020

Ken’ichiro Oyama

February 10, 2020
Tweet

More Decks by Ken’ichiro Oyama

Other Decks in Technology

Transcript

  1. খࢁ݈Ұ࿠(.01FQBCP *OD
    1)1,BJHJ
    ஌Βͳ͍8FCΞϓϦέʔγϣϯͷ։ൃʹ
    ్த͔Β+0*/ͨ͠ͱ͖ɺ
    Ͳ͔͜Β੾ΓࠐΉ͔ʁ

    View full-size slide

  2. IUUQTHJUIVCDPNL-P8
    ϓϦϯγύϧΤϯδχΞ
    খࢁ݈Ұ࿠!L-P8
    ϗεςΟϯάࣄۀ෦ϗεςΟϯάάϧʔϓϚωʔδυΫϥ΢υνʔϜ

    View full-size slide

  3. w్த+0*/ʹ͍ͭͯվΊͯߟ͑Δ
    w్த+0*/ͷϊ΢ϋ΢ڞ༗ͷ͖͔͚ͬΛ࡞Δ
    wࢲ͕ɺΈͳ͞Μͷɺ్த+0*/ͷϊ΢ϋ΢Λ஌Γ͍ͨ
    ͜ͷൃදͷΰʔϧ

    View full-size slide

  4. Έͳ͞Μ͸
    ։ൃʹ్த+0*/ͨ͠ܦݧ͸
    ͋Γ·͔͢ʁ

    View full-size slide

  5. w ࣮͸͋·Γ్த+0*/ͷܦݧ͕ͳ͍
    w θϩ͔Βߏங͢Δܦݧͷ΄͏͕ѹ౗తʹଟ͍
    w ϓϩδΣΫτʹ్த͔Β+0*/͢Δܦݧ͕ຊ౰ʹগͳ͍
    w 044׆ಈʹ΋ϞϩʹͰ͍ͯͯɺ(JU)VCͷϓϩϑΟʔϧ
    ͷάϥϑΛΈͯ΋ҟৗͳภΓʢѹ౗తʹࣗ෼ͷ044΁ͷίϛοτ͕ଟ͍ʣ
    w ͳͷͰɺࠓճͷ్த+0*/Λ͢Δͱ͖ɺ஫ҙਂࣗ͘਎ͷঢ়گ
    Λ֬ೝ͠ͳ͕ΒਐΊ͍ͯ͘͜ͱʹͨ͠
    ࢲ͸ͱ͍͏ͱ

    View full-size slide

  6. w 1)1.Z42-
    w ͍ΘΏΔ8FC%#ͷΞϓϦέʔγϣϯ
    w ຊ൪؀ڥɾεςʔδϯά؀ڥɾڞ༗։ൃ؀ڥ
    w ։ൃ؀ڥ΋7BHSBOUͰ༻ҙ
    w Πϯϑϥߏ੒΋$IFGͰߏஙɾ؅ཧ
    w αʔϏεͱͯ͠ͷྺ࢙͸௕͘ɺଞαʔϏεͱͷ࿈ܞ΋͋Γ
    +0*/ͨ͠αʔϏεͷ֓ཁ

    View full-size slide

  7. ͜͜·ͰͰ։ൃʹ
    औΓ͔͔Εͦ͏Ͱ͔͢ʁ

    View full-size slide

  8. w 1)1΍.Z42-ɺ$IFGͳͲ͸৮ͬͨ͜ͱ͋Δ
    w 1)1νϣοτσΩϧ
    w ݴͬͯΈΕ͹αʔϏεΛߏ੒͍ͯ͠Δٕज़ελοΫʹͭ
    ͍ͯͷཧղʹ͍ͭͯ͸΄΅໰୊ͳͦ͞͏
    w ιʔείʔυ΋(JUʢ()&ʣͰ؅ཧ͞Ε͍ͯΔ
    w ͍͚ͦ͏
    w ͦΕͳͷʹͳͥʁ
    ͳͥ։ൃʹऔΓ͔͔Εͳ͍ͷ͔ʁ

    View full-size slide

  9. θϩ͔Β։ൃ͢Δͱ͖Λߟ͑ͯΈΔ
    ͲͷΑ͏ͳαʔϏε͔

    View full-size slide

  10. θϩ͔Β։ൃ͢Δͱ͖Λߟ͑ͯΈΔ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔

    View full-size slide

  11. θϩ͔Β։ൃ͢Δͱ͖Λߟ͑ͯΈΔ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ

    View full-size slide

  12. θϩ͔Β։ൃ͢Δͱ͖Λߟ͑ͯΈΔ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ

    View full-size slide

  13. θϩ͔Β։ൃ͢Δͱ͖Λߟ͑ͯΈΔ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ
    ͲͷΑ͏ͳίʔυ͔

    View full-size slide

  14. w͔Β·ͰੵΈ্͛ͯɺ
    ͸͡Ίͯ։ൃ͕Ͱ͖͍ͯΔ
    ঢ়ଶʹͳΔ
    θϩ͔Β։ൃ͢Δͱ͖Λߟ͑ͯΈΔ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ
    ͲͷΑ͏ͳίʔυ͔
    ։ൃ

    View full-size slide

  15. wٕज़ελοΫ͕Θ͔ͬͯຊ
    ൪؀ڥ΍։ൃ؀ڥ͕͋ͬ
    ͨͱͯ͠΋ɺɺɺ͕଍
    Γͳ͍
    w͜ͷੵΈ্͛͸్த͔Β
    +0*/͢Δͱͯ͠΋ඞཁ
    Կ͕଍Γͳ͍͔
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ
    ͲͷΑ͏ͳίʔυ͔
    ։ൃ

    View full-size slide

  16. ʮͲ͔͜Β੾ΓࠐΉ͔ʁʯ
    ͷճ౴͸ɺৗʹ
    ʮͲͷΑ͏ͳαʔϏε͔Λ஌Δ͜ͱ͔Βʯ

    View full-size slide

  17. w ։ൃΛ͢Δ্Ͱͷؾ͖ͮΛଟ͘͢ΔͨΊɻ
    w Կ͔ͷػೳΛͭ࡞Δͱ͖ɺͦͷػೳ͚ͩͰαʔϏε͕੒
    Γཱ͍ͬͯΔΘ͚Ͱ͸ͳ͍ɻଞͷػೳͱͷؔ܎͍ͯ͠Δɻ
    w ͜ͷؔ܎ੑͷࠜװʹ͋Δͷ͕ʮͲͷΑ͏ͳαʔϏεͳͷ
    ͔ʯ
    ʮͲͷΑ͏ͳαʔϏε͔ʯ͕ͳͥඞཁ͔

    View full-size slide

  18. w ͍͍ͩͨ3%#.4͕ͩ3%#.4ʹݶΒͳ͍
    w αʔϏεͷػೳ΍࣮૷্ͷ੍໿ͷ৘ใ͕΋ͬͱ΋৭ೱ͘Ͱ
    ͍ͯΔͷ͸ίʔυͰ͸ͳͯ͘σʔλϕʔεͷςʔϒϧઃܭ
    w 8FCΞϓϦέʔγϣϯ͸ɺۃ࿦ͯ͠͠·͑͹σʔλͷग़͠
    ೖΕͳͷͰɺӬଓσʔλ͕͋ΔՕॴͷઃܭ΍੍໿Λ೺Ѳ͢
    Δ͜ͱͰɺαʔϏεͷࠜݩͷ෦෼͔ΒཧղͰ͖Δ
    w 8FCΞϓϦέʔγϣϯͷ࣮૷ʹӨڹΛड͚ͳ͍ܗͰཧղͰ
    ͖Δ৘ใ
    ʮͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔ʯ͕ͳͥඞཁ͔

    View full-size slide

  19. σʔλϕʔεͷण໋͸
    ΞϓϦέʔγϣϯΑΓ΋௕͍
    ીࠜ૖େ

    View full-size slide

  20. w ͍͍ͩͨ3%#.4͕ͩ3%#.4ʹݶΒͳ͍
    w αʔϏεͷػೳ΍࣮૷্ͷ੍໿ͷ৘ใ͕΋ͬͱ΋৭ೱ͘Ͱ
    ͍ͯΔͷ͸ίʔυͰ͸ͳͯ͘σʔλϕʔεͷςʔϒϧઃܭ
    w 8FCΞϓϦέʔγϣϯ͸ɺۃ࿦ͯ͠͠·͑͹σʔλͷग़͠
    ೖΕͳͷͰɺӬଓσʔλ͕͋ΔՕॴͷઃܭ΍੍໿Λ೺Ѳ͢
    Δ͜ͱͰɺαʔϏεͷࠜݩͷ෦෼͔ΒཧղͰ͖Δ
    w 8FCΞϓϦέʔγϣϯͷ࣮૷ʹӨڹΛड͚ͳ͍ܗͰཧղͰ
    ͖Δ৘ใ
    ʮͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔ʯ͕ͳͥඞཁ͔

    View full-size slide

  21. wιʔείʔυΛಡΉͨΊͷΤϯτϦʔϙΠϯτ͕஌Γ͍ͨ
    w 8FCΞϓϦέʔγϣϯΛͲ͔͜ΒಡΈਐΊΕ͹ྑ͍͔ͱ
    ͍͏۩ମతͳࢦ਑
    w ϝδϟʔͳϑϨʔϜϫʔΫΛར༻͍ͯ͠Δ৔߹͸҉໧తʹ
    ఻͍͑ͯΔ͜ͱ͕ଟ͍
    w ͦ͏Ͱͳ͍৔߹͸ɺʮ)551ϦΫΤετΛͲ͏ϧʔςΟ
    ϯά͍ͯ͠Δ͔ʯ͔Β஌Δඞཁ͕͋Δ
    w ʮ։ൃʯʹ࠷΋͍ۙϨΠϠʔͳͷͰܦݧ஋ͷߴ͍Τϯδχ
    Ξ͸ྗٕͰղܾ͢ΔͷͰඞཁͳ͍͜ͱ΋
    ʮͲͷΑ͏ͳίʔυ͔ʯ͕ͳͥඞཁ͔

    View full-size slide

  22. ٕज़ελοΫͷ஌͕ࣝ͋ͬͨͱͯ͠΋
    ։ൃ։࢝·Ͱʹ͸
    खؒͱ͕͔͔࣌ؒΔ

    View full-size slide

  23. l։ൃ։࢝·ͰͷΦʔόʔϔουz

    View full-size slide

  24. w ։ൃʹऔΓֻ͔Δ·Ͱʹ͔͔Δ࣌ؒΛɺ͜ͷηογϣϯͰ
    ͸ʮ։ൃ։࢝·ͰͷΦʔόʔϔουʯͱݺͿ
    w ։ൃνʔϜ͕ˋະདྷӬ߷ݻఆϝϯόʔͰ͋Δඞཁ͕ͳ
    ͍ݶΓʮ։ൃ։࢝·ͰͷΦʔόʔϔουʯ͸ͦͷ։ൃʹ͓
    ͍ͯ՝୊ͱͳΓ͏Δ
    w ࣮͸ࢲ͕஌Βͳ͍͚ͩͰԿ໊͔લ͕͍ͭͯͦ͏ͳͷͰ୭͔ڭ͍͑ͯͩ͘͞
    w ΋͘͠͸΋ͬͱ໊͍͍લΛͥͻ
    ։ൃ։࢝·ͰͷΦʔόʔϔου

    View full-size slide

  25. ʮ్த+0*/ͷϊ΢ϋ΢ʯͱ͸
    ʮ։ൃ։࢝·ͰͷΦʔόʔϔουΛ
    ͲͷΑ͏ʹখ͘͢͞Δ͔ʯ
    ͱ͍͏͜ͱ

    View full-size slide

  26. ։ൃ։࢝·ͰͷΦʔόʔϔου
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ
    ͲͷΑ͏ͳίʔυ͔
    ։ൃ
    αʔϏεཧղϨΠϠʔ
    ΞʔΩςΫνϟཧղϨΠϠʔ
    σʔλετΞཧղϨΠϠʔ
    ؀ڥϨΠϠʔ
    ίʔυϨΠϠʔ

    View full-size slide

  27. w αʔϏε։ൃʹ͓͚Δଐਓੑ͕ബ͘ͳΔ
    w αʔϏε୯ҐͰ͸ͳ͘ɺͦͷͱ͖ͦͷͱ͖ͷϓϩδΣΫτ
    ୯ҐͰͷ։ൃ͕͠΍͘͢ͳΔ
    wεϖγϟϧνʔϜͷ݁੒͕͠΍͘͢ͳΔ
    w ։ൃϝϯόʔͷҠಈͱಉ࣌ʹαʔϏεΛԣஅٕͨ͠ज़஌ݟ
    ͷަྲྀ͕׆ൃʹͳΔ
    w ͦͷαʔϏεͷಥൃతͳٕज़՝୊ʹରͯ͠ɺ͙͢ʹผνʔ
    Ϝ΋ؚΊͯͨશΤϯδχΞͰऔΓ૊Ή͜ͱ͕Ͱ͖Δ
    ΦʔόʔϔουΛখ͘͢͞ΔϝϦοτ

    View full-size slide

  28. w ։ൃ։࢝·ͰͷΦʔόʔϔου࡟ݮͷύλʔϯʹ͸ɺେ͖
    ͭ͘ʹ෼ྨ͞ΕΔ
    w+0*/͢Δϝϯόʔ͕޻෉ͯ͠࡟ݮ͢Δύλʔϯ
    w ύλʔϯΛ஌͓͚ͬͯ͹ࣄલ४උͳ͠Ͱ࣮ߦՄೳ
    w ͨͩ͠εέʔϧ͠ͳ͍
    wαʔϏεͱͯ͠ࣄલʹ࡟ݮ͓ͯ͘͠ύλʔϯ
    w εέʔϧ͢Δ
    w ͨͩ͠αʔϏεͷมԽʹӨڹ͢ΔͳΒ͹ৗʹΞοϓσʔ
    τ͕ඞཁ
    Φʔόʔϔου࡟ݮύλʔϯ

    View full-size slide

  29. ྫ͑͹ࢲ͕࣮ફͨ͠
    Φʔόʔϔου࡟ݮ

    View full-size slide

  30. είʔϓΛߜΔ

    View full-size slide

  31. wॎʹείʔϓΛߜͬͯ೺Ѳ
    ͢Δ͜ͱͰΦʔόʔϔου
    Λ࡟ݮ
    wੵΈ্͛Δඞཁ͕͋Δͷ
    ͰϐϥϛουܕʹͳΔ
    ʢλϫʔܕʹ͸ͳΓʹ͘
    ͍ʣ
    είʔϓΛߜΔ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ
    ͲͷΑ͏ͳίʔυ͔
    ։ൃ

    View full-size slide

  32. w αʔϏε֓ཁʢαʔϏεཧղϨΠϠʔʣΛείʔϓΛߜͬ
    ͯ೺Ѳ͢Δ
    w ʮͲͷΑ͏ͳϢʔβ͕͜ͷαʔϏεΛར༻͍ͯ͠ΔͷͰ
    ͔͢ʁʯ
    w ϢʔβͷಛੑʹΑ࣮ͬͯ૷ͷ࢓ํ͕มΘΔ
    w ʮͲͷΑ͏ͳαʔϏεͱ࿈ܞΛ͍ͯ͠ΔͷͰ͔͢ʁʯ
    w ࿈ܞͯͨ͠ΒϩάΠϯ΋࿈ܞͯͦ͠͏
    είʔϓΛߜΔ

    View full-size slide

  33. w σʔλϕʔεͷઃܭʢσʔλετΞཧղϨΠϠʔʣΛείʔϓΛ
    ߜͬͯ೺Ѳ͢Δ
    w ʮϢʔβʔςʔϒϧͬͯͲΕͰ͔͢ʁʯ
    w ʮϑϨʔϜϫʔΫʢ03.ʣͬͯԿΛ࢖͍ͬͯ·͔͢ʁʯ
    w 03.ʹΑͬͯ͸ίʔυ͔Β࣮ࡍͷϦϨʔγϣϯΛ೺ѲͰ͖
    Δ
    w είʔϓΛߜͬͯιʔείʔυΛಡΈղ͘ʢίʔυϨΠϠʔʣ
    w ʮϩάΠϯϖʔδͬͯ͜ͷ63-͚ͩͰ͔͢ʁʯ
    w ʮ)551ϦΫΤετͷΤϯτϦʔϙΠϯτΛڭ͍͑ͯͩ͘͞ʯ
    είʔϓΛߜΔ

    View full-size slide

  34. ઐ༻4MBDLνϟϯωϧΛ࡞Δ

    View full-size slide

  35. w ։ൃ͕يಓʹͷΔ·Ͱͷઐ༻4MBDLνϟϯωϧΛ࡞ͬͯɺ
    ͦ͜Ͱ͋ΒΏΔ࣭໰΍ٙ໰ɺͭͿ΍͖Λॻ͘
    wʮࢲ͕௨Δ։ൃ։࢝·ͰͷಓͷΓ͸͖ͬͱ࣍ͷਓ΋௨Δʯ
    w ઐ༻ʹ͢Δ͜ͱͰλΠϜϥΠϯΛʮ։ൃ։࢝·Ͱͷ࿩୊ʯ
    ʹߜΕΔ
    w 4MBDLͰ࣭໰Λ͍ͯ͠Δ͚ͩͰɺ։ൃ։࢝·Ͱͷͭ·ͮ
    ͖ϙΠϯτ͕ू໿͞Εͯίεύ͕͍͍
    w ʮ࣭໰͗ͯ͢͠5-͕ྲྀΕͯ͠·͏ʯΈ͍ͨͳ৺഑΋ඞཁͳ
    ͍ɻͳͥͳΒઐ༻͔ͩΒ
    w ༗༻ͳ΋ͷ͸υΩϡϝϯτԽɺيಓʹͷͬͨΒBSDIJWF
    ઐ༻4MBDLνϟϯωϧΛ࡞Δ

    View full-size slide

  36. ดͨ͡։ൃ؀ڥΛखʹ͍ΕΔ

    View full-size slide

  37. w ༻ҙ͞Ε͍ͯͨͷ͸7BHSBOU؀ڥڞ௨σʔλϕʔεϝʔ
    ϧαʔό
    w σβΠφʔ΋ར༻͢ΔͨΊɺ։ൃ؀ڥߏஙίετΛখ͞
    ͨ݁͘͠Ռͩͱ༧૝
    w ΋͏গ͠ґଘੑͳ͘؀ڥΛ࡞ΕΔΑ͏ʹͳΔͱΑΓίετ
    ͕খ͘͞ͳΓͦ͏ʢ؀ڥϨΠϠʔͷվળʣ
    w %PDLFSͰ։ൃʹඞཁͳ؀ڥ͚ͩʹ͢Δ
    w ϝʔϧૹ৴ػೳ΋ϝʔϧαʔόͳ͠Ͱ؀ڥΛ༻ҙ͓ͯ͘͠
    ͱศརͦ͏
    ดͨ͡։ൃ؀ڥΛखʹ͍ΕΔ

    View full-size slide

  38. %PDLFS1)1TFOENBJM
    # docker-compose.yml
    version: '3'
    services:
    www:
    image: php:latest
    volumes:
    - ./maildir:/path/to/maildir
    - ./sendmail.ini:/etc/php/conf.d/sendmail.ini
    - ./mail.sh:/usr/local/bin/mail.sh
    # sendmail.ini
    sendmail_path = /usr/local/bin/mail.sh
    # mail.sh
    cat - >> /path/to/maildir/sendmail_out
    ࢀߟIUUQTRJJUBDPNTBXBOPCPMZJUFNTCBCFFCEDBF

    View full-size slide

  39. ؍ଌͰ͖֤ͨϨΠϠʔͷΦʔόʔϔου࡟ݮ
    ͲͷΑ͏ͳαʔϏε͔
    ͲͷΑ͏ͳΞʔΩςΫνϟ͔
    ͲͷΑ͏ʹσʔλΛอ࣋͢Δ͔
    ʢʹͲͷΑ͏ͳςʔϒϧઃܭ͔ʣ
    ͲͷΑ͏ͳ։ൃ؀ڥ͔
    ʢຊ൪؀ڥɾ։ൃ؀ڥʣ
    ͲͷΑ͏ͳίʔυ͔
    ։ൃ
    Πϯϑϥߏ੒ਤ
    1)1%PD
    *%&
    ։ൃ؀ڥͷ%PDLFSԽ
    αʔϏεϔϧϓ
    σϓϩΠͷ$IBUCPUԽ
    ςετίʔυ
    ϚΠάϨʔγϣϯϑΝΠϧ
    1VMM3FRVFTU
    ϑϨʔϜϫʔΫ

    View full-size slide

  40. w ։ൃ։࢝·ͰͷΦʔόʔϔου࡟ݮ͸࣮͸༷ʑͳϨΠϠʔ
    Ͱ࣮ࢪ͍ͯ͠Δ͜ͱ͕Θ͔Δ
    w ΋ͬͱ૊৫ͱͯ͠ҙࣝͯ͠ઓུతʹ࣮ࢪ͢Δ͜ͱ͕Ͱ͖Ε
    ͹ɺΑΓߴ͍ޮՌΛಘΔ͜ͱ͕Ͱ͖ΔͷͰ͸ͳ͍͔ʁ
    w l։ൃ։࢝·ͰͷΦʔόʔϔουz࡟ݮύλʔϯΛ΋ͬͱந
    ৅Խͯ͠ମܥԽͯ͠Ͱ͖ΔͷͰ͸ͳ͍͔ʁ
    w ΋ͬͱ৘ใ͕ཉ͍͠
    l։ൃ։࢝·ͰͷΦʔόʔϔουz࡟ݮ

    View full-size slide

  41. l։ൃ։࢝·ͰͷΦʔόʔϔουz
    Λٕज़ʢΤϯδχΞϦϯάʣͰ
    ࡟ݮ͢Δ

    View full-size slide

  42. w ਓྗͰ͸ͳ͘ɺٕज़ʹΑͬͯ։ൃ։࢝·ͰͷΦʔόʔϔο
    υΛ࡟ݮͰ͖Δ࢓૊ΈΛఏڙ͢Δ
    w ٕज़ʹΑͬͯఏڙͰ͖Δͱ͍͏͜ͱ͸ʮ൚༻ੑ͕ߴ͍ʯ
    ʮ࠶ݱੑ͕͋Δʯͱ͍͏͜ͱ
    w ٕज़ͷੵΈॏͶʹΑͬͯʮ൚༻తʹʯʮ࠶ݱͯ͠ʯΦʔόʔ
    ϔουΛݶΓͳ͘খ͘͞Ͱ͖ΔΑ͏ʹͳΔͱɺ૊৫ͱͯ͠
    ܧଓͯ͠ϝϦοτΛಘΔ͜ͱ͕Ͱ͖Δɻ
    wͦͯ͠ɺΦʔόʔϔου͕খ͍͜͞ͱΛલఏͱͨ͠૊৫Λ
    ࡞Δ͜ͱ͕Ͱ͖Δɻ
    l։ൃ։࢝·ͰͷΦʔόʔϔουzΛٕज़Ͱ࡟ݮ͢Δ

    View full-size slide

  43. ٕज़ʹΑΔ
    l։ൃ։࢝·ͰͷΦʔόʔϔουz
    ࡟ݮͷྫ

    View full-size slide

  44. શαʔόͷϢʔβϩʔϧ
    ͷίʔυԽ

    View full-size slide

  45. w 45/4BMMPXTZPVUPFBTJMZNBOBHF
    -JOVYVTFSTXJUITJNQMF50.-CBTFE
    DPOpHVSBUJPO
    w *UDPOTJTUTPGTFSWFSBOEDMJFOU
    JNQMFNFOUBUJPO XIJDISFRVJSFTPOMZB
    GFXTUFQTUPJOTUBMM
    w .PSFPWFS ZPVDBOVTFJUXJUIFYJTUJOH
    VTFSNBOBHFNFOUTZTUFNTTVDIBT
    -%"1
    w IUUQTTUOTKQ

    View full-size slide

  46. w ϖύϘͷ ͨͿΜ

    શαʔόʹల։͞Ε͍ͯΔ͜ͱͰɺ50.-
    ϑΝΠϧΛमਖ਼ͨ͠1VMM3FRVFTU͕Ϛʔδ͞ΕΔ͚ͩͰ
    αʔό܈΁ͷ44)ΞΫηεݖΛಘΔ͜ͱ͕Ͱ͖Δ
    wݖݶ͕(JUͰ؅ཧ͞Ε͍ͯΔͷ΋ڧྗ
    w ͋·Γʹࣗવʹ͋Γ͗ͯ͢ϖύϘύʔτφʔ͸๨Ε͕ͪ
    w Կ୆͋Δ͔Θ͔Βͳ͍αʔόΛӡ༻͢Δ͏͑Ͱɺ45/4ʹ
    ΑΔ؀ڥϨΠϠʔͰͷΦʔόʔϔου࡟ݮ཰͸૬౰େ͖͍
    45/4

    View full-size slide

  47. σʔλϕʔευΩϡϝϯτͷ
    ܧଓతΠϯςάϨʔγϣϯ
    ͱपล৘ใͱͷϦϯΫ

    View full-size slide

  48. w UCMTJTB$*'SJFOEMZUPPMGPSEPDVNFOU
    BEBUBCBTF XSJUUFOJO(P
    w %PDVNFOUBEBUBCBTFBVUPNBUJDBMMZ
    JO('.GPSNBU0VUQVUEBUBCBTF
    TDIFNBJONBOZGPSNBUT
    w 4JOHMFCJOBSZ$*'SJFOEMZ
    w 4VQQPSUNBOZEBUBCBTFT
    w 1PTUHSF42-.Z42-42-JUF42-4FSWFS
    #JH2VFSZ"NB[PO3FETIJGU$MPVE4QBOOFS
    w 8PSLBTMJOUFSGPSEBUBCBTF
    w IUUQTHJUIVCDPNL-P8UCMT

    View full-size slide

  49. w σʔλϕʔευΩϡϝϯτΛੜ੒Ͱ͖Δ͚ͩͰ͸ͳ͍
    w $*ʹ૊ΈࠐΉ͜ͱͰυΩϡϝϯτͷߋ৽๨ΕΛػցతʹ๷͙͜ͱ
    ͕Ͱ͖ΔͷͰɺৗʹ࠷৽ͷঢ়ଶΛอͯΔ
    w ࣮σʔλϕʔεʹ"-5&3͢Δ͜ͱͳ͘ίϝϯτ΍ϦϨʔγϣϯΛ
    ௥ՃฤूՄೳ
    w υΩϡϝϯτΛ.BSLEPXOͰग़ྗͰ͖ΔͷͰɺιʔείʔυͱಉ
    ͡ϦϙδτϦʹίϛοτ͢Δ͜ͱͰɺςʔϒϧͷΧϥϜͱιʔε
    ίʔυΛϒϥ΢β্ͰಡΜͰࣈͷ͝ͱ͘ϦϯΫ͢Δ͜ͱ͕Ͱ͖Δ
    w σʔλετΞཧղϨΠϠʔΛܧଓతʹαϙʔτ
    UCMT

    View full-size slide

  50. $ brew install k1LoW/tap/tbls
    $ cat .tbls.yml
    dsn: mysql://dbuser:dbpass@$dbhost:3306/dbname
    docPath: docs/schema
    $ tbls doc

    View full-size slide

  51. طଘͷσʔλϕʔεΛର৅ʹ͍͖ͳΓtbls docΛ࣮ߦͯ͠υΩϡϝϯτΛੜ
    ੒ίϛοτ
    ϒϥϯνΛ੾ͬͯςʔϒϧͷ֓ཁΛ஌͍ͬͯΔϝϯόʔ͔ΒώΞϦϯάΛ͠ͳ
    ͕ΒUCMTZNMΛຒΊ͍ͯ͘
    w ର৅ςʔϒϧɾର৅ΧϥϜͷ֓ཁ
    w ςʔϒϧͷϦϨʔγϣϯ
    w ॏཁͳͱ͜Ζ͸A 63-
    AΛ͔ͭͬͯυΩϡϝϯτͱιʔείʔυΛ௚઀
    ϦϯΫ
    1VMM3FRVFTUϕʔεͰ֬ೝͯ͠΋Β͏ɺ࠷ޙʹtbls docΛ࣮ߦͯ͠υΩϡϝ
    ϯτΛ࠶ੜ੒ίϛοτ
    ҎԼ܁Γฦ͠
    ܧଓతυΩϡϝϯτΞοϓσʔτ

    View full-size slide

  52. w .JDSPTFSWJDFT؀ڥ΍αʔϏεԣஅͰͷ։ൃʹରԠͰ͖ΔΑ͏ʹɺ
    σʔλϕʔεΛ·͍ͨͩςʔϒϧϦϨʔγϣϯΛදݱͰ͖ΔΑ͏ʹ
    ͢Δ
    w /BNFTQBDF
    w 7FSTJPOJOH
    w 3%#.4͔ΒαϙʔτൣғΛ͞Βʹ޿͛Δ
    w ֤छ03.ͱͷΠϯςάϨʔγϣϯ
    w %BUBCBTFEPDVNFOUBTB4FSWJDF
    UCMT/&95ʢߏ૝ʣ

    View full-size slide

  53. l։ൃ։࢝·ͰͷΦʔόʔϔουz

    View full-size slide

  54. w ్த+0*/Ͱ։ൃ։࢝·Ͱʹඞཁͳ͜ͱ͸ɺθϩ͔Β։ൃ͢Δͱ͖ͱ
    ಉ͡
    w ҧ͏ͷ͸͢ͰʹαʔϏε͕ଘࡏͯ͠։ൃ͕ਐߦ͍ͯ͠Δ͔Ͳ͏͔
    ͚ͩɻ࠷ॳʹ੾ΓࠐΉ৔ॴ͸ಉ͡ɻ
    w ్த+0*/ͷϊ΢ϋ΢ʹ։ൃ։࢝·ͰͷΦʔόʔϔουΛখ͘͢͞Δ
    ํ๏
    w ΦʔόʔϔουΛ࡟ݮ͢Δͱ͍͏͜ͱ͸ɺ૊৫ͷ͋Γํʹ΋ΠϯύΫ
    τΛ༩͑ΒΕΔ͘Β͍ॏཁͳ՝୊ͳͷͰੵۃతʹߟ͍͖͍͑ͯͨ
    w ͥͻօ͞Μͷ஌ݟΛڞ༗͍ͯͩ͘͠͞ʂ
    ·ͱΊ

    View full-size slide

  55. 5IBOLZPV
    ࠷৽ͷ࠾༻৘ใΛνΣοΫˠ !QC@SFDSVJU

    View full-size slide