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

Repositoryによる抽象化の理想と現実/Ideal and reality of abstraction by Repository

sonatard
December 04, 2019

Repositoryによる抽象化の理想と現実/Ideal and reality of abstraction by Repository

sonatard

December 04, 2019
Tweet

More Decks by sonatard

Other Decks in Programming

Transcript

  1. 1
    3FQPTJUPSZʹΑΔந৅Խͷཧ૝ͱݱ࣮
    HPMBOHUPLZP೥຤ͩΑʂ(Pେ๨೥ձ-5େձʂ
    !TPOBUBSE

    View full-size slide

  2. Appify Technologies
    CTO
    ͦͳଠ
    @sonatard

    View full-size slide

  3. JOGSB૚
    3
    3FQPTJUPSZͱ͸
    w %%%ͷϨΠϠʔυΞʔΩςΫνϟͰఏএ͞Ε͍ͯΔ
    w 3FQPTJUPSZͰΠϯλʔϑΣʔεΛఆٛ͢Δ͜ͱʹΑΓJOGSB૚Λந৅Խɺґଘੑͷٯస
    w ϞοΫͷࠩ͠ସ͕͑ՄೳʹͳΓBQQMJDBUJPO૚ͷϢχοτςετ͕ՄೳʹͳΔ
    BQQMJDBUJPO
    3FQPTJUPSZ
    $MPVE%BUBTUPSF .Z42- "1*
    1PTUHSF42-

    View full-size slide

  4. 4
    6TFSऔಘ
    "DDPVOUऔಘ
    ࢒ߴॲཧ
    "DDPVOUߋ৽
    τϥϯβΫγϣϯ
    ΞϓϦέʔγϣϯ૚ͷૹۚॲཧ

    View full-size slide

  5. 5
    ͦͷ
    ԿΛந৅Խ͍ͯ͠Δͷ͔

    View full-size slide

  6. 6
    ந৅Խͱ͍͏͔Βʹ͸Կ͔Λந৅Խ͍ͯ͠Δ͸ͣ
    %#΍"1*ΛؚΊͯ֎෦΁ͷ*0͢΂ͯΛந৅Խ͍ͯ͠Δʁ
    %# ,74ؚΉ
    Λந৅Խ͍ͯ͠Δʁ
    3%#.4Λந৅Խ͍ͯ͠Δʁ

    View full-size slide

  7. 7
    ͦ͜Ͱ۩ମྫ͔Βߟ͑ͯΈΔ

    View full-size slide

  8. 8
    ͜ͷίʔυͰ͸3FQPTJUPSZͰ
    ԿΛந৅Խ͍ͯ͠Δ͔ߟ͑ͯΈΔ

    View full-size slide

  9. 9
    ͜ͷίʔυ͚ͩͰ͸ߟ͑ͯ΋ԿΛந৅Խ͍ͯ͠Δ͔Θ͔Βͳ͍
    ந৅Խ͞Ε͍ͯΔ͔Β
    ͦ͜͸ΠϯλʔϑΣʔεͷ࢓༷Λ֬ೝ͠ͳ͚Ε͹ͳΒͳ͍

    View full-size slide

  10. 10
    ԿΛந৅Խ͍ͯ͠Δ͔ݴޠԽ͠Α͏
    νʔϜϝϯόʔͰڞ௨ͷೝࣝΛ࣋ͱ͏

    View full-size slide

  11. 11
    %%%ʹॻ͍ͯ͋Δ͔Β3FQPTJUPSZΛ༻ҙ͢Δ͸/(
    ந৅Խ͢ΔͨΊʹ3FQPTJUPSZΛར༻͠Α͏

    View full-size slide

  12. 12
    ͦͷ
    ͦͷந৅Խ͸ਖ਼͍͔͠

    View full-size slide

  13. 13
    ֤3FQPTJUPSZ͸ɺ%#΍"1*ίʔϧ΋ؚΊͨ
    ֎෦΁ͷ*0͢΂ͯΛந৅Խ͍ͯ͠Δ৔߹
    ͜ͷந৅Խ͸ਖ਼͍͠ʁ

    View full-size slide

  14. 14
    ਖ਼͘͠ͳ͍

    View full-size slide

  15. 15
    ந৅Խ͞Ε͍ͯΔͨΊɺ"DDPVOU3FQPTJUPSZ͸"1*ίʔϧʹΑΓଞͷ.JDSPTFSWJDFT΁ΞΫηε͍ͯ͠Δ
    Մೳੑ͕͋Δɻ͔͠͠"1*ίʔϧ͸%#ͷτϥϯβΫγϣϯର৅֎ɻ
    "DDPVOU͸్தͰΤϥʔʹͳͬͨ৔߹ʹద੾ͳϩʔϧόοΫ͕͞Εͳ͍ɻ
    "DDPVOU͕)551Ͱ͋Δͱ͍͏ҙࣝΛͯ͠ϩʔϧόοΫॲཧͷ࣮૷͕ඞཁɻ

    View full-size slide

  16. 16
    ΞϓϦέʔγϣϯ࣮૷ऀͷࢥߟ
    ͜ͷ"DDPVOU3FQPTJUPSZ͸)551ͩΖ͏͔ʁ%#ͩΖ͏͔ʁ
    )551ͳΒϩʔϧόοΫॲཧॻ͔ͳ͍ͱ͍͚ͳ͍ͳ
    %#ͳΒτϥϯβΫγϣϯͰͲ͏ʹ͔ͳΔͳ
    ந৅Խͨ͠͸͕ͣҙࣝతʹ͸ϓϩτίϧͷ۩৅ʹґଘ͍ͯ͠Δ
    ͭ·Γ͜Ε͸ந৅ԽͰ͸ͳ͘ɺͨͩίʔυ্ʹඞཁͳ৘ใ͕ͳ͍͚ͩͰ͋Δ

    View full-size slide

  17. 17
    3FQPTJUPSZʹΑΔந৅Խઃܭ͕ؒҧ͍ͬͯΔ

    View full-size slide

  18. 18
    ͜ΕΛղܾ͢Δํ๏͸ͭ
    ந৅Խʹ͋Θ࣮ͤͨ૷
    ந৅Խͷݶఆ
    ந৅Խͷ෼ׂ

    View full-size slide

  19. 19
    ղܾࡦந৅Խʹ߹Θ࣮ͤͨ૷
    5Yؔ਺Ͱ%#ͱ"1*ͷτϥϯβΫγϣϯΛ࣮ݱ͢Δ
    ֎෦ͷ"1*ʹϩʔϧόοΫ༻ͷ"1*Λఆٛɺద੾ͳϦτϥΠॲཧͳͲ

    View full-size slide

  20. 20
    ղܾࡦந৅Խͷݶఆ
    %#͔͠ߟྀ͢Δඞཁ͕ͳ͍ͷͰ͋Ε͹
    3FQPTJUPSZͷந৅Խର৅͔Β"1*Λআ֎͢Δ

    View full-size slide

  21. 21
    ղܾࡦந৅Խͷ෼ׂ
    %#ͱ"1*Λಉ͡ந৅ʹؚΊͳ͍

    View full-size slide

  22. 22
    ந৅ԽͰӕΛ͔ͭͳ͍

    View full-size slide

  23. 23
    ૉ௚ʹϓϩτίϧ͕දݱ͞Ε͍ͯΔํ͕Մಡੑ͕ߴ͍

    View full-size slide

  24. 24
    %%%ʹॻ͍ͯ͋Δ͔Β3FQPTJUPSZΛ༻ҙ͢Δ͸/(
    ਖ਼͍͠ந৅ԽΛίʔυ্Ͱදݱ͠Α͏

    View full-size slide

  25. 25
    ͦͷ
    ͦͷந৅Խ͸ඞཁ͔ʁ

    View full-size slide

  26. 26
    ͜Μͳ࿩Λฉ͘͜ͱ͕͋Δ
    কདྷΠϯϑϥ͕มߋ͞ΕΔՄೳੑ͕͋Δ͔Βɺ3FQPTJUPSZͰந৅Խ͢Δ
    .Z42-͕1PTUHSFT42-ʹ ผͷ3%#.4ʹ

    .Z42-͕$MPVE%BUBTUPSFʹ ,74ʹ

    .Z42-͕.JDSPTFSWJDFTʹ "1*ίʔϧʹ

    View full-size slide

  27. 27
    ຊ౰ʹ͜ͷมߋ͸͋Δʁ

    View full-size slide

  28. 28
    ͜ͷมߋ͕ىͬͨ͜ͱ͖Λ૝ఆͨ͠ద੾ͳந৅ԽΛͰ͖͍ͯΔʁ

    View full-size slide

  29. 29
    .Z42-ɺ$MPVE4QBOOFSɺ$MPVEEBUBTUPSFͰ͸࣮ߦͰ͖ΔΫΤϦʔ͸ҧ͏
    .Z42-ͳΒΫΤϦʔͰ࣮ݱͰ͖Δ͜ͱ΋ɺ$MPVEEBUBTUPSFͰ͸υϝΠϯͰ࣮ࢪ͢Δඞཁ
    ͕͋Δ͜ͱ͕͋Δ
    τϥϯβΫγϣϯΛ࣮ݱ͢ΔͨΊʹඞཁͳ஋ͷܕ΋ҧ͏

    View full-size slide

  30. 30
    ΋͠ݕূɺςετ͍ͯ͠ͳ͍ͳΒߟྀͰ͖͍ͯΔͱ͸ݴ͑ͳ͍
    த్൒୺ͳந৅Խ͸։ൃ଎౓Λམͱ͍ͯ͠Δ͚͔ͩ΋͠Εͳ͍

    View full-size slide

  31. 31
    ա౓ͳະདྷΛ૝ఆͨ͠ઃܭͰ͸ͳ͍͔ʁ
    ͦΕʹΑΓ༨ܭͳ࣮૷͕૿͍͑ͯͳ͍͔ʁ

    View full-size slide

  32. 32
    ݱࡏ͸ಛఆͷ%#΁ґଘͨ͠ΠϯλʔϑΣʔεʹ͓͖ͯ͠ɺ
    কདྷ%#ͷมߋ͕͋ͬͨͱ͖ʹॻ͖௚͢ํ͕଎͍ͷͰ͸ͳ͍͔ʁ

    View full-size slide

  33. 33
    ςελϏϦςΟͷͨΊͳΒΠϯϑϥͷϓϩτίϧΛந৅Խ͠ͳ͍Ͱɺ
    ۩ମతͳΠϯϑϥʹґଘͨ͠ΠϯλʔϑΣʔεΛ༻ҙ͢Δ͚ͩͰे෼
    .Z42-PS.PDL
    $MPVE%BUBTUPSFPS.PDL
    $MPVE4QBOOFSPS.PDL

    View full-size slide

  34. 34
    ΋͘͠͸ར༻͍ͯ͠Δ%#΍"1*ͷΫϥΠΞϯτϥΠϒϥϦʹ.PDLͷػೳ͕͋Ε͹
    ͦΕͰे෼Ͱ͸ͳ͍Ͱ͠ΐ͏͔ʁ

    View full-size slide

  35. 35
    %%%ʹॻ͍ͯ͋Δ͔Β3FQPTJUPSZΛ༻ҙ͢Δ͸/(
    ϓϩμΫτʹຊ౰ʹඞཁͳந৅Խ͚ͩΛ࣮૷͠Α͏

    View full-size slide

  36. 36
    ͦͷ
    ந৅ԽͱϨΠϠʔԽ͸ҟͳΔ

    View full-size slide

  37. 37
    ຊ౰ʹ΍Γ͔͍ͨ͜ͱ͸ϓϩτίϧͷந৅ԽͰ͠ΐ͏͔ʁ
    ΋͔ͯ͠͠ඞཁͳͷ͸ؔ৺͝ͱͷ෼཭ʁ

    View full-size slide

  38. 38
    3FQPTJUPSZ͸ɺந৅ԽͱϨΠϠʔԽΛಉ࣌ʹ࣮ࢪ͍ͯ͠Δͷ͕Ұൠత
    ࠓ͋ͳ͕ͨߟ͍͑ͯΔ3FQPTJUPSZͷϝϦοτ͸ɺ
    ந৅ԽʹΑΔ΋ͷʁͦΕͱ΋ϨΠϠʔԽʹΑΔ΋ͷʁ

    View full-size slide

  39. 39
    ϨΠϠʔԽͷϝϦοτ
    ؔ৺͝ͱͷ෼཭
    ୯Ұ੹೚ͷݪଇ
    ࣮૷ͷӅṭ

    View full-size slide

  40. 40
    ந৅ԽͷϝϦοτ
    ։์ด࠯ݪଇ
    ґଘੑٯసͷݪଇ
    ςελϏϦςΟ
    ϓϩτίϧͷந৅Խ

    View full-size slide

  41. 41
    ຊ౰ʹந৅Խ͸ඞཁͰ͔͢ʁ

    View full-size slide

  42. 42
    ϓϩτίϧͷந৅Խ͸ඞཁͰ͔͢ʁ

    View full-size slide

  43. 43
    ࢲͨͪ͸ݱࡏϓϩτίϧͷந৅ԽͷͨΊͷ3FQPTJUPSZ͸༻ҙ͍ͯ͠·ͤΜ

    View full-size slide

  44. 44
    কདྷ%#͕มΘΔ૝ఆ͸͍ͯ͠·ͤΜɻ
    มΘͬͨ࣌ʹ௚͢ͱ͍͏൑அͰ͢ɻ

    View full-size slide

  45. 45
    ςελϏϦςΟͷͨΊͷΠϯλʔϑΣʔε͸ඞཁͰ͔͢ʁ
    ඞཁͳΒͪΌΜͱϢʔεέʔεͷϢχοτςετΛॻ͍͍ͯ·͔͢ʁ

    View full-size slide

  46. 46
    ࢲͨͪ͸ݱࡏςετͷͨΊͷ3FQPTJUPSZΛ༻ҙ͍ͯ͠·ͤΜ

    View full-size slide

  47. 47
    ΞϓϦέʔγϣϯ૚͕े෼ʹγϯϓϧͰ͋ΔͨΊ&&ςετͰิ͑Δ
    ΞϓϦέʔγϣϯ૚ʹGPSจ΍ΤϥʔϋϯυϦϯάҎ֎ͷJGจ͸ొ৔͠ͳ͍

    View full-size slide

  48. 48
    ϨΠϠʔԽ
    ΞϓϦέʔγϣϯ૚ͱΠϯϑϥ૚ͷ෼཭͸͍ͯ͠·͢

    View full-size slide

  49. 49
    ؔ৺͝ͱͷ෼཭ɺ୯Ұ੹೚ͷݪଇɺ৘ใӅṭ͸࣮ࢪͨ͠΄͏͕ྑ͍ͱ͍͏൑அ

    View full-size slide

  50. 50
    ந৅ԽͱϨΠϠʔԽͷϝϦοτΛ۠ผͯ͠ɺνʔϜͰඞཁͳ΋ͷΛબ୒͠Α͏

    View full-size slide

  51. 51
    ͓ΘΓʹ
    Έͳ͞Μ͸3FQPTJUPSZͰԿΛந৅Խ͍ͯ͠·͔͢ʁ
    ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide