デザインにオブジェクト指向を適用する / Apply Object-Oriented to your design

070d33664df274636dad3da21c9b21fc?s=47 rockname
February 16, 2020

デザインにオブジェクト指向を適用する / Apply Object-Oriented to your design

070d33664df274636dad3da21c9b21fc?s=128

rockname

February 16, 2020
Tweet

Transcript

  1. σβΠϯʹΦϒδΣΫτࢦ޲Λద༻͢Δ גࣜձࣾϛΫγΟΈͯͶࣄۀ෦ ϩΫωϜ!SPDLOBNF

  2. NJYJ *OD ࣗݾ঺հ ϩΫωϜSPDLOBNF ؠ໊༐ً w גࣜձࣾϛΫγΟΈͯͶࣄۀ෦ॴଐ w ೥ʹ৽ଔͱͯ͠ೖࣾ w

    J04ΛϝΠϯʹ"OESPJE 3BJMT΋ॻ͍ͨΓ͢ΔΤϯδχΞ w 75VCFS ʹ͡͞Μ͡ ͕޷͖
  3. NJYJ *OD

  4. None
  5. NJYJ *OD Θ͔Γʹ͍͘6* Ո଒ΞϧόϜΈͯͶΛʮΘ͔Γʹ͍͘6*ʯʹͳΔΑ͏ ઃܭͯ͠Έ·͢

  6. ʮΞϧόϜΛݟΔʯΛλοϓ ʮՖࢠͷΞϧόϜʯΛબ୒ ՖࢠͷΞϧόϜ͕දࣔ͞ΕΔ

  7. NJYJ *OD ͳͥΘ͔Γʹ͍͘ͷ͔ w ਓؒ͸ΦϒδΣΫτʹରͯ͠ͲΜͳΞΫγϣϯΛ͢Ε͹Ͳ͏ͳ Δ͔ɺͱ͍͏ΠϝʔδΛϝϯλϧϞσϧͱͯ͠ܗ੒͍ͯ͠·͢ w ઌͷʮΘ͔Γʹ͍͘6*ʯͰ͸ɺ·ͣ͸ΞΫγϣϯΛબ୒ͤ͞ ͯɺ࣍ʹͦͷΞΫγϣϯͷର৅ͱͳΔΦϒδΣΫτΛબ୒ͤ͞ ͍ͯ·ͨ͠

    w ͜ͷΑ͏ͳʮΞΫγϣϯ ಈࢺ ˠΦϒδΣΫτ ໊ࢺ ʯͷૢ࡞ Λڧ͍ΒΕΔਓؒͷϝϯλϧϞσϧʹ൓ͨ͠6*ΛλεΫϕʔ εͷ6*ͱݺͼ·͢ w ରͯ͠ɺΦϒδΣΫτ͕ઌʹ͖ͯɺ࣍ʹͦͷΦϒδΣΫτʹର ͢ΔΞΫγϣϯΛબ୒ͤ͞Δɺͱ͍͏ʮ໊ࢺˠಈࢺʯͷॱংͰ ઃܭ͞Εͨ6*ΛΦϒδΣΫτϕʔεͷ6*ͱݺͼ·͢ IUUQTBUPDIPUUPDPNΑΓ
  8. NJYJ *OD ϞʔμϧWTϞʔυϨε w λεΫϕʔεʹ͓͚Δಈࢺ͕ઌߦͨ͠6*ͷઃܭͩͱɺͦͷ ಈࢺͷதͰʮϞʔυʯ͕ੜ·ΕɺλεΫ͕׬ྃ͢Δ·Ͱଞ ͷϞʔυʹ੾Γସ͑Δ͜ͱ͕Ͱ͖ͳ͘ͳͬͯ͠·͍·͢ w ͜ͷΑ͏ͳϞʔυΛ࣋ͭ6*ͷ͜ͱΛϞʔμϧͱݺͼ·͢ w

    ରͯ͠ɺͦͷΑ͏ͳϞʔυ͕ଘࡏͤͣɺϢʔβʔ͸ଘࡏ͢ ΔΦϒδΣΫτʹରͯࣗ͠༝ʹΞΫγϣϯΛద༻Ͱ͖Δঢ় ଶͷ6*ΛϞʔυϨεͱݺͼ·͢ w 6*Λઃܭ͢Δ্Ͱ͸ɺՄೳͳݶΓϢʔβʔʹγεςϜ΁ͷ ओಋݖΛ༩͑Δ΂͘ϞʔυΛഉআ͠ϞʔυϨεΛఏڙ͢Δ ͜ͱ͕ྑ͍ͱ͞Ε͍ͯ·͢ IUUQTEFWFMPQFSBQQMFDPNEFTJHOIVNBO JOUFSGBDFHVJEFMJOFTJPTBQQBSDIJUFDUVSF NPEBMJUZΑΓ
  9. 0CKFDU0SJFOUFE6TFS*OUFSGBDF

  10. NJYJ *OD 006*ͱ͸ w ཁٻϞσϧ͔Βߏ଄తʹநग़ͨ͠ΦϒδΣΫτΛத৺ʹѻ͏6*ͷઃܭख๏Ͱ͢ w ೥ʹ*#.͕ൃදͨ͠ʮ0CKFDU0SJFOUFE*OUFSGBDF%FTJHO*#.$PNNPO6TFS "DDFTT(VJEFMJOFTʯͷલஈ෦෼ʹͯʮ0CKFDU0SJFOUFE6TFS*OUFSGBDFʢ006*ʣʯ ͱ͍͏ݴ༿Ͱ(6*ͷࢥ૝͕ޠΒΕ·ͨ͠ w

    006*ʹΑΓઃܭ͞Εͨ6*͸ΦϒδΣΫτϕʔεͷϞʔυϨεͳ6*ͱͳΓɺΦϒδΣΫτ ͕ߏ଄తʹϚοϐϯά͞ΕͨϏϡʔ͸Ϣʔβʔʹࣗ༝౓ͷߴ͍௚ײతͳૢ࡞ੑΛఏڙ͠ ·͢
  11. NJYJ *OD 006*ͷϞσϦϯάํ๏  ΦϒδΣΫτͷநग़  Ϗϡʔͷఆٛͱઃܭ  ϨΠΞ΢τͷઃܭ

  12. NJYJ *OD ΦϒδΣΫτͷநग़ αʔϏεΛఏڙ͢Δର৅ྖҬͷυϝΠϯ͔Β Ϣʔβʔͷૢ࡞ର৅ͱͳΔΦϒδΣΫτΛநग़͠·͢

  13. NJYJ *OD υϝΠϯۦಈઃܭͰυϝΠϯΦϒδΣΫτΛநग़͢Δ w ॻ੶ʮΤϦοΫΤϰΝϯεͷυϝΠϯۦಈઃܭʯͰ͸ɺҎԼͷΑ͏ͳखॱ ͰυϝΠϯϞσϦϯά͕ߦΘΕ͍ͯ·ͨ͠  ର৅υϝΠϯʹਫ਼௨ͨ͠υϝΠϯΤΩεύʔτͱର࿩͠஌ࣝΛநग़  நग़͞ΕͨυϝΠϯͷ஌͔ࣝΒϞσϧΛ։ൃ

     Ϟσϧͱ࣮૷Λ݁ͼ͚ͭΔ  Ϟσϧʹج͍ͮͯݴޠΛચ࿅ͤ͞Δ  ϒϨΠϯετʔϛϯάͱ࣮ݧΛ܁Γฦͯ͠ϞσϧΛચ࿅ ৠཹ͢Δ w ࠓճ͸ɺࣗ෼͕ΈͯͶͷυϝΠϯΤΩεύʔτͰ͋ΔͱԾఆ͠ɺ্هखॱ ͷ ·ͰΛߦ͍؆ૉͳυϝΠϯϞσϧΛநग़͠·͢
  14. NJYJ *OD ϢʔεέʔεϞσϦϯά w υϝΠϯϞσϧΛઃܭ͢Δ্Ͱཁ݅Λ੔ཧ͢ΔΞϓϩʔν͸༷ʑ͋Δ͕ɺࠓճ͸؆ུԽͷ ͨΊϢʔεέʔεϞσϦϯάͷΈΛ࠾༻͠·͢ w ϢʔεέʔεϞσϦϯά͸Ϣʔβʔ͕γεςϜͰԿΛ͢Δͷ͔ɺԿΛͰ͖ͯԿ͕Ͱ͖ͳ͍ ͷ͔ͱ͍͏Α͏ͳ͜ͱΛ໌֬Խ͢ΔͨΊʹ࢖༻͞Ε·͢ w

    ·ͣ͸ϢʔεέʔεਤΛඳ͍ͯొ৔ਓ෺ͱେ·͔ͳఏڙ͢ΔػೳΛચ͍ग़͠·͢
  15. NJYJ *OD Ϣʔεέʔεਤ w ύοέʔδ͸ʮΞϧόϜʯͱʮϝσΟΞʯʹ෼ׂ ͞Ε·ͨ͠ w ෕ɾ฼ͱͦΕҎ֎ͷՈ଒ʹΑͬͯΞϧόϜʹର͠ ͯͰ͖ΔΞΫγϣϯʹҧ͍͕ੜ·ΕΔͨΊɺ͜ͷ Ո଒ʹ͓͚ΔϢʔβʔͷʮཱ৔ʯͷ໾ׂ͸ॏཁͦ

    ͏Ͱ͢
  16. NJYJ *OD Ϣʔεέʔεهड़ w ϢʔεέʔεਤͰ͸ৄࡉͳ࢓༷͕͸͖ͬΓ͠ͳ͍ͷͰɺ ʮϢʔεέʔεهड़ʯΛߦ͍·͢ w Ϣʔεέʔεهड़͸ɺجຊతʹ͸ҎԼͷΑ͏ͳϑΥʔϚοτ Ͱ࡞੒͞Ε·͢ w

    Ϣʔεέʔε໊ w ֓ཁ w ΞΫλʔ w ࣄલ৚݅ w ࣄޙ৚݅ w Πϕϯτϑϩʔ w ϝΠϯϑϩʔ w ୅ସϑϩʔ w ྫ֎ϑϩʔ
  17. NJYJ *OD υϝΠϯϞσϦϯά w ΞϧόϜ ϝσΟΞͳͲɺϢʔεέʔεϞ σϦϯάʹΑΓநग़͞Εͨ֓೦ΛυϝΠ ϯϞσϧͱͯ͠ఆٛ͠·͢ w ͜ͷͱ͖ɺͦΕͧΕͷϞσϧ͕࣋ͭϓϩ

    ύςΟ·Ͱهड़Ͱ͖͍ͯΔͱͳ͓ྑ͍Ͱ ͠ΐ͏ w ͋͘·Ͱ͜Ε͸όʔδϣϯͷυϝΠϯ ϞσϧͰ͋Γɺຊདྷ͸͔͜͜Β࣮૷Λ௨ ͯ͡ΑΓྑ͍Ϟσϧ΁ͱચ࿅ͤ͞·͢
  18. NJYJ *OD Ϗϡʔͷఆٛͱઃܭ ର৅ͱͳΔϞσϧΛநग़Ͱ͖ͨͷͰɺଓ͍ͯͦΕΒΛ දࣔ͢ΔϏϡʔΛఆٛ͠·͢

  19. NJYJ *OD ίϨΫγϣϯͱγϯάϧ Ϗϡʔͷఆٛ͸େ͖͘ʮίϨΫγϣϯʯͱʮγϯάϧʯʹ෼͚Δ͜ͱ͕Ͱ͖·͢ w ίϨΫγϣϯ w ͭͷϏϡʔͷதʹಉ͡ϞσϧΛෳ਺ฒ΂ͯදࣔ͠·͢ w ྻڍ͞ΕΔϞσϧͷࢹೝੑΛߴΊΔͨΊʹɺදࣔ͢ΔϞσϧͷଐੑ͸ߜΓ·͢

    w γϯάϧ w ͭͷϏϡʔͰͭͷϞσϧͷΈΛදࣔ͠·͢ w γϯάϧͰ͸Ϟσϧͷ৘ใΛΑΓৄࡉʹදࣔ͠·͢
  20. NJYJ *OD ϞσϧͱϏϡʔͷ֓೦ਤ w ϞσϧΛϏϡʔ΁Ϛοϐϯά͢΂͘ɺ֓ ೦ਤΛॻ͍ͯ੔ཧ͠·͢ w ͜͜Ͱ͸͋͘·ͰϏϡʔ͸ͲͷΦϒδΣ ΫτΛදࣔ͢Δ͔ɺ͓ΑͼͲͷΑ͏ʹը ໘ભҠ͢Δ͔Λఆٛͯ͠ɺ৭΍ϑΥϯτ

    ͳͲͷϨΠΞ΢τ͸࣍ͷεςοϓͰߟ͑ ·͢
  21. NJYJ *OD ϨΠΞ΢τͷઃܭ Ϗϡʔͷઃܭ͕Ͱ͖ͨͷͰɺྫͱͯ͠J04ΞϓϦͷϨ ΠΞ΢τΛߟ͑·͠ΐ͏

  22. NJYJ *OD Ϗϡʔͷఆ͔ٛΒϨΠΞ΢τΛߟ͑ΔϝσΟΞҰཡ w ·ͣ͸ϝσΟΞͷίϨΫγϣϯදࣔΛߟ͑·͠ΐ͏ w J04Ͱ͸ίϨΫγϣϯͱͯ͠୯ҰΧϥϜͷ 5BCMF7JFXͱϚϧνΧϥϜͷ$PMMFDUJPO7JFX͕ఏڙ ͞Ε͍ͯ·͢ w

    ࣸਅɾಈըͷΑ͏ͳࢹೝੑͷߴ͍ΦϒδΣΫτ͸ $PMMFDUJPO7JFXͰΞϧόϜͷΑ͏ʹฒ΂ͯදࣔ͢Δ ͷ͕ྑͦ͞͏Ͱ͢
  23. NJYJ *OD Ϗϡʔͷఆ͔ٛΒϨΠΞ΢τΛߟ͑ΔϝσΟΞৄࡉ w ଓ͍ͯɺϝσΟΞৄࡉʹ͍ͭͯߟ͑·͢ w γϯάϧͰදࣔ͞ΕͨϝσΟΞʹ͸ɺϝσΟΞͱରଟ Ͱඥͮ͘ίϝϯτ΋ҰॹʹίϨΫγϣϯͰදࣔ͠·͢ w ϝσΟΞҰཡͰ͸දࣔ͞Ε͍ͯͳ͔ͬͨɺϝσΟΞͷ

    ʮ͍ͭ౤ߘ͞Εͨͷ͔ʯ΍ʮެ։ൣғʯͱ͍ͬͨϓϩ ύςΟ΋දࣔͰ͖Δͱྑ͍Ͱ͠ΐ͏ w ·ͨɺϝσΟΞͱ͍͏ΦϒδΣΫτʹରͯ͠ߦ͑Δʮ͓ ؾʹೖΓʯ΍ʮίϝϯτʯͷΞΫγϣϯ΋දࣔͰ͖Δ ͱྑ͍Ͱ͢
  24. ϝσΟΞҰཡ ϝσΟΞৄࡉ

  25. NJYJ *OD 006*͸ߏ଄ઃܭ·ͰΛࢧ͑Δ w ΪϟϨοτͷஈ֊Ϟσϧʹ͓͚Δߏ଄ઃܭ· ͰΛࢧ͑Δͷ͕006*Ͱ͢ w ͦΕΑΓ্ͷΠϯλϥΫγϣϯ΍ϨΠΞ΢τͷ σβΠϯʹ͸·ͨҧ͏εΩϧ͕ཁٻ͞Ε·͢ w

    ׬੒౓ͷߴ͍σβΠϯγεςϜΛߏஙͰ͖ͯ ͍Ε͹ද૚ͷઃܭ΋γεςϜԽͰ͖Δ͔΋͠Ε ·ͤΜ IUUQXXXKKHOFUFMFNFOUT USBOTMBUJPOTFMFNFOUT@KQQEGΑΓ
  26. NJYJ *OD

  27. NJYJ *OD ࠷ޙʹ w Ϣʔβʔͷʮ໊ࢺˠಈࢺʯͱ͍͏ΦϒδΣΫτࢦ޲ͳϝϯλϧϞσϧΛ6*ʹ൓өͤ͞Δͨ Ίͷํ๏࿦Ͱ͋Δ006*ʹ͍ͭͯ঺հ͠·ͨ͠ w λεΫϕʔεͷʮΘ͔Γʹ͍͘6*ʯΛݟ͚ͭͨͱ͖ͷΦϒδΣΫτϕʔε΁ͷΞϓϩʔν ͱͯ͠ຊτʔΫ͕গ͠Ͱ΋ώϯτʹͳΕ͹޾͍Ͱ͢

  28. NJYJ *OD ࢀߟࢿྉ w 006*rΦϒδΣΫτϕʔεͷ6*ϞσϦϯά w IUUQTXXXTPDJPNFEJBDPKQ w 006*ͷ໨౰ͯ w

    IUUQTXXXTPDJPNFEJBDPKQ w 006*ɾΦϒδΣΫτϕʔεͳ6*σβΠϯʹऔΓ૊ΉͨΊͷ৺ߏ͑ w IUUQTOPUFDPNVTBHJNBSVNBOOFFG w ʮ࣮ફυϝΠϯۦಈઃܭʯΛಡΜͩͷͰɺ࣮ࡍʹ%%%Ͱઃܭͯ͠࡞ͬͯΈͨʂ w IUUQTRJJUBDPN"11-&JUFNTEEEDDCCGFFB w υϝΠϯϞσϦϯάͷ࢝Ίํ w IUUQTTQFBLFSEFDLDPNKJLPUPNFJONPUFSJOLVGBMTFTIJNFGBOH
  29. Thank you!!!