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

3cb4e761dbdb7aebd1ffd85f752e1e3e?s=47 sonata
December 04, 2019

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

3cb4e761dbdb7aebd1ffd85f752e1e3e?s=128

sonata

December 04, 2019
Tweet

Transcript

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

  2. D Technologies ͦͳଠ @sonatard • Linux Server and Network Engineer

    # System C • Wireless LAN Module Simulator # Cݴޠ • TCP/IP protocol stack on RTOS • TCP Offload Engine # Go • Google App Engine # TypeScript • React+Redux # Swift • iOS
  3. JOGSB૚ 3 3FQPTJUPSZͱ͸ w %%%ͷϨΠϠʔυΞʔΩςΫνϟͰఏএ͞Ε͍ͯΔ w 3FQPTJUPSZͰΠϯλʔϑΣʔεΛఆٛ͢Δ͜ͱʹΑΓJOGSB૚Λந৅Խɺґଘੑͷٯస w ϞοΫͷࠩ͠ସ͕͑ՄೳʹͳΓBQQMJDBUJPO૚ͷϢχοτςετ͕ՄೳʹͳΔ BQQMJDBUJPO

    3FQPTJUPSZ $MPVE%BUBTUPSF .Z42- "1* 1PTUHSF42-
  4. 4 6TFSऔಘ "DDPVOUऔಘ ࢒ߴॲཧ "DDPVOUߋ৽ τϥϯβΫγϣϯ ΞϓϦέʔγϣϯ૚ͷૹۚॲཧ

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

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

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

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

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

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

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

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

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

  14. 14 ਖ਼͘͠ͳ͍

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

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

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

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

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

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

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

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

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

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

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

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

    "1*ίʔϧʹ
  27. 27 ຊ౰ʹ͜ͷมߋ͸͋Δʁ

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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