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

普段使いのDDD

haljik
June 24, 2017

 普段使いのDDD

#KanJavaPartyA2

haljik

June 24, 2017
Tweet

More Decks by haljik

Other Decks in Programming

Transcript

  1. ීஈ࢖͍ͷ%%%
    ,"/+"7"1"35:
    !IBMKJL

    View full-size slide

  2. ࣗݾ঺հ
    w 5XJUUFS!IBMKJL
    w ໊લɿՏ্੖࢘ʢ͔Θ͔Έ͍ͤ͡ʣ
    w ϑϦʔϥϯε೥໨ͷ+BWBϓϩάϥϚ
    w ؔ੢%%%KBWBओ࠵

    View full-size slide

  3. ͜ͷࢿྉʹ͍ͭͯ
    w ࢲ͕ৗ೔ࠒ͔ΒυϝΠϯۦಈઃܭʹ͍ͭͯߟ͍͑ͯ
    ΔࣄΛݴޠԽͨ͠΋ͷͰɺͦΕҎ্ͷ΋ͷͰ͸͋Γ
    ·ͤΜ
    w +BWB͕લఏͰ͸͋Γ·͕͋͢·Γ+BWBͷ࿩͸͠·
    ͤΜ
    w ΦϒδΣΫτࢦ޲Ͱ͢
    w ϚΠΫϩαʔϏεͱ͔$234ͱ͔ͷ࿩͸͋Γ·ͤΜ

    View full-size slide

  4. ࠓ೔࿩͢ࣄ
    w υϝΠϯۦಈઃܭ͕໨ඪͱ͍ͯ͠Δ͜ͱ
    w υϝΠϯۦಈઃܭ͕લఏͱ͍ͯ͠Δ͜ͱ
    w ʮυϝΠϯͰۦಈ͢Δʯͱ͍͏͜ͱͷ࣮ࡍ
    w νʔϜͰڞ༗͓ͯ͘͜͠ͱ
    w ࣮ࡍʹײͨ͡ޮՌ
    w ʮීஈ࢖͍ʯͱ͍͏͜ͱ

    View full-size slide

  5. υϝΠϯۦಈઃܭ͕໨ඪ
    ͱ͍ͯ͠Δ͜ͱ

    View full-size slide

  6. ॊೈͰ֦ுੑʹ෋Μͩ
    ιϑτ΢ΣΞ

    View full-size slide

  7. मਖ਼΍֦ு͕ࠔ೉ʹͳͬͯ
    ͠·ͬͨ৔߹͸ࣦഊ

    View full-size slide

  8. Ͳ͏ͳ͍ͬͯΕ͹ྑ͍͔ʁ
    ར༻ऀ͕ʮ͜͜ʯΛʮ͜͏ʯ͍ͨ͠ͱ͍
    ͏ཁ๬ʹରͯ͠ɺʮ͜͜ʯΛʮ͜͏ʯ͢
    Δ͚ͩͰมߋͰ͖ΔΑ͏ʹͳ͍ͬͯΕ͹
    ྑͦ͞͏

    View full-size slide

  9. υϝΠϯۦಈઃܭ͕લఏ
    ͱ͍ͯ͠Δ΋ͷ

    View full-size slide

  10. ։ൃνʔϜ͕ར༻ऀͷ׆ಈʹؔ͢Δ
    ஌ࣝମܥΛഎෛ͍ࠐΉ͜ͱ
    w ୯ͳΔ஌ࣝͰ͸ͳ͘ମܥ

    CPEZPGLOPXMFEHF˞

    w ͨͩ஌Δ͚ͩͰ͸ͳ͘എෛࠐΉ

    CSJOHUPCFBS˞

    ˞&SJD&WBOT %PNBJO%SJWFO%FTJHO
    "EEJTPO8FTMFZ1SPGFTTJPOBM൛

    ୈ̍෦ͷং൫

    View full-size slide

  11. ෼ۀ͠ͳ͍
    w ෼ੳɾઃܭऀͱϓϩάϥϚΛ෼͚ͳ͍

    ຋༁ͤͣؔ৺ࣄͱϓϩάϥϜͷ୯ҐΛҰகͤ͞Δ
    w Ϟσϧͷ࡞੒ऀͱϞσϧͷར༻ऀΛ෼͚ͳ͍

    ϞσϧͱͦΕΛར༻͢Δଆͷίʔυ͸ɺϞσϧʹ৽
    ͨͳ஌͕ࣝ੝Γࠐ·ΕΔ౓ʹมߋ͞ΕΔ

    View full-size slide

  12. ΠςϨʔςΟϒͳϓϩηε
    w Ϟσϧ͸։ൃऀͷ஌ࣝͱͱ΋ʹ੒௕͢Δ
    w ͪΐͬͱ໊ͨ͠લมߋͰ͢ΒϞσϧΛར༻͢Δଆͷ
    ίʔυʹ೾ٴ͢Δ
    w ϓϩάϥϛϯάͷϓϥοτϑΥʔϜʹΑΔ੍໿ͷΑ
    ͏ͳ΋ͷ΋౰વϞσϧʹϑΟʔυόοΫ͕͔͔Δ
    w ͦ͏Ͱͳ͍ͱ࣮༻ੑͷͳ͍ϞσϧʹͳΔ

    View full-size slide

  13. ʮυϝΠϯͰۦಈ͢Δʯ
    ͱ͍͏͜ͱͷ࣮ࡍ

    View full-size slide

  14. ར༻ऀͷؔ৺ࣄυϝΠϯ

    View full-size slide

  15. ར༻ऀͷ͍͏ʮ͜͜ʯΛ͜͏
    ͍ͨ͠ͷʮ͜͜ʯ͕ίʔυ
    ্ͷͲ͜Λࢦ͢ͷ͔ʁ

    View full-size slide

  16. ར༻ऀͷؔ৺ࣄͱ͸ҧ͏୯ҐͰ
    ϓϩάϥϛϯάͯ͠͠·͏ͱม
    ߋͷӨڹൣғ͸༧૝Ͱ͖ͳ͍

    View full-size slide

  17. ա౓ͳந৅Խͱ͔

    View full-size slide

  18. ٕज़ۦಈͱ͔

    View full-size slide

  19. ը໘ۦಈͱ͔

    View full-size slide

  20. ͍Ζ͍Ζ͋Δ͚Ͳ
    ༧૝֎ͷӨڹ͸༧૝֎ͷί
    ετʹͳΓൃలΛ્֐͢Δ

    View full-size slide

  21. ར༻ऀͷؔ৺ࣄʹϓϩάϥϛϯάͷجຊ
    ୯ҐΛ͋ΘͤΔ
    ؔ৺ࣄͷ୯ҐͰ൑அɺՃ޻ϩδοΫΛ࣋
    ͪɺͦΕΒͷϩδοΫʹۦಈ͞ΕΔιϑ
    τ΢ΣΞʹ͢Δ

    View full-size slide

  22. υϝΠϯϞσϧʹۦಈ͞Ε
    ΔΞϓϦέʔγϣϯΛ࡞Δ

    View full-size slide

  23. υϝΠϯϞσϧͰۦಈ͞ΕΔ
    ΞϓϦέʔγϣϯΛ࡞Δʹ͸
    υϝΠϯϞσϧ͕࣋ͭ൑அɺՃ޻ϩδοΫʹରͯ͋͠
    ΒΏΔͱ͜Ζ͔ΒΞΫηεͰ͖ΔΑ͏ͳΞʔΩςΫνϟ
    Λ࠾༻͠ɺυϝΠϯϞσϧʹ൑அɺՃ޻ϩδοΫΛू
    ΊΔඞཁ͕͋Δ

    View full-size slide

  24. νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  25. w ڥք͚ͮΒΕͨίϯςΩετ
    w ίϯςΩετͷ֓ཁϞσϦϯά
    w ϓϩάϥϛϯά্ͷݪଇ
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  26. ڥք෇͚ΒΕͨίϯςΩετ
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  27. ڥք͚ͮΒΕͨίϯςΩετ
    w ίϯςΩετʹࢹ࠲

    ݻ༗໊ࢺҎ֎͸·ͣࢹ࠲Λ֫ಘ͠ͳ͍ͱ໊લ͕ܾ·Βͳ͍
    w ࢹ࠲ͱ͸γεςϜར༻ऀͱར༻໨తͷʮ૊Έ߹Θͤʯ

    ྫʣస৬αΠτɿʮاۀ͕ࣗࣾʹ͋ͬͨࣾһΛ୳͢ҝʯʮٻ৬
    ऀ͕ࣗ෼ʹ͋ͬͨస৬ઌاۀΛ୳͢ҝʯͳͲͳͲ
    w ࢹ࠲͝ͱʹϞσϦϯάͷ໊લۭؒΛ෼͚ͯɺͦͷࢹ࠲͔ΒΈͨ
    Ϟσϧͷಋग़ʹूத͢ΔʹίϯςΩετʹಛԽ͢Δ

    ྫʣస৬αΠτɿʮاۀʯͱʮٻ৬ऀʯͱ͍͏໊લۭؒʹ෼͚
    Δ
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  28. ࢹ࠲Ͱ஌ࣝΛ੔ཧ
    ࢹ࠲͕ίϯςΩετʹͳΔ
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  29. ࢹ࠲ͷݟ͚ͭํ
    w ࡞Ζ͏ͱ͍ͯ͠ΔαʔϏε΍γεςϜͷར༻ऀΛચ
    ͍ग़͢ ਓͷ໾ׂͩͬͨΓγεςϜͩͬͨΓ͢Δ

    w ͦΕͧΕͷར༻ऀ͕ԿΛ໨తʹͦͷγεςϜΛ࢖͏
    ͷ͔Λ໌֬ʹ͢Δ
    w ໨త͕ҧ͏ͳΒผͷࢹ࠲
    w ໨త͕ಉ͡ͳΒಉ͡ࢹ࠲ʢ͔΋ʣ
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  30. ίϯςΩετͷ֓ཁϞσϦϯά
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  31. w ਓɺ෺ɺࣄ෼ੳ
    w ࣌ܥྻ෼ੳ
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  32. ਓɾ෺ɾࣄ෼ੳ
    ਓٻ৬ऀɺձһɺاۀͷ୲౰ऀ

    ෺ٻਓɺاۀ

    ࣄݕࡧɺԠืɺεΧ΢τ
    ྫɿٻਓαΠτͷٻ৬ऀΛࢹ࠲ʹͨ͠৔߹
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  33. ࣌ܥྻ෼ੳ
    ٻ৬ऀɺاۀ͕ಠཱͯ͠·ͣ͋Δ
    ٻ৬ऀ͕ձһొ࿥Λ͓͜ͳ͍ձһʹͳΔ
    اۀ͕ٻਓΛొ࿥͢Δ
    اۀ͕ٻਓΛఴ෇ͨ͠εΧ΢τΛձһʹૹΔ
    ձһ͸اۀ͔ΒεΧ΢τΛड͚ͱΔ
    ձһ͸εΧ΢τʹԠื͢Δ
    ͳͲಠཱͯ͋͠Δਓ΍෺Λ·ͣฒ΂ͦΕΒ͕ى͜͢ओཁͳΠϕϯτΛ࣌ܥྻʹฒ΂Δ
    ྫɿٻਓαΠτͷٻ৬ऀΛࢹ࠲ʹͨ͠৔߹
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  34. ϞσϧԽͨ͠΋ͷ
    ਓɺ෺ɺࣄ෼ੳͰग़ͨཁૉΛ࣌
    ܥྻ෼ੳͰؔ܎෇͚͠ɺґଘͷ
    ํ޲ΛܾΊͨঢ়ଶ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  35. ϞσϧΛίʔυͰ
    ͜ͷϨϕϧͰ͸ϞσϧͷτοϓϨϕϧύοέʔδ
    ͷߏ଄Ͱදݱ͢Δ


    EPNBJONPEFM

    DBOEJEBUF ٻ৬ऀ

    DPNQBOZ اۀ

    P⒎FS ٻਓ

    NFNCFS ձһ

    TDPVU εΧ΢τ

    BQQMJDBUJPO Ԡื


    ύοέʔδؒͷґଘํ޲͸ͦͷ··಺෦ͷΦϒδΣ
    Ϋτ͕ύοέʔδΛލ͙ࡍͷґଘํ޲ʹ͢Δ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  36. ϙΠϯτ
    w ࢹ࠲Λ֫ಘ͢Δ͜ͱͰɺͦͷࢹ࠲͔ΒΈͯෆཁͳ΋
    ͷΛ࡟͗མͱ͠ɺॏཁͳ΋ͷΛڧௐ͢Δ
    w ࣌ܥྻͰચ͍ग़͢ґଘͷํ޲͸ॏཁͳ΋ͷ

    ͋ΔλΠϛϯάͰଘࡏ͠ͳ͍΋ͷ͸ࢀরͰ͖ͳ͍ͷ
    Ͱ͜ΕΛ่͢ͱ࣋ͬͯΔ͔͍࣋ͬͯͳ͍͔ͱ͍͏ঢ়
    ଶ͕૿͑ͯෳࡶ౓͕Ճ଎

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  37. ϓϩάϥϛϯά্ͷݪଇ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  38. ϓϩάϥϛϯά্ͷݪଇ
    w ΞʔΩςΫνϟ
    w ϦϑΝΫλϦϯά
    w υϝΠϯΦϒδΣΫτͷίʔυ
    w Ϟσϧͷࣗಈςετ
    w +BWBͷجຊతͳ͜ͱ
    w ΦϒδΣΫτࢦ޲

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  39. ΞʔΩςΫνϟ
    ̏૚ʴυϝΠϯϞσϧ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  40. ̏૚υϝΠϯϞσϧ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  41. w υϝΠϯʹଞͷ̏૚͕ґଘ͍ͯ͠Δҙຯ

    υϝΠϯ͕શͯΛ੍ޚ͢Δҝ

    υϝΠϯʹϩδοΫΛूΊΔҝ
    w ϓϨθϯςʔγϣϯ૚

    ը໘ભҠ΍ΞϓϦέʔγϣϯ૚ͷݺͼग़͠ʹప͢Δ
    w ΞϓϦέʔγϣϯ૚

    υϝΠϯΦϒδΣΫτͷૢ࡞ͱ

    ΠϯϑϥετϥΫνϟ૚ͷݺͼग़͠ʹప͢Δ
    w ΠϯϑϥετϥΫνϟ૚

    υϝΠϯͰఆٛ͞ΕΔϦϙδτϦΠϯλʔϑΣʔεͷ࣮૷Λஔ͘

    3%#,74ͷૢ࡞ɺଞ"1*ͷݺͼग़͠ͳͲɺར༻ऀͷؔ৺ࣄΑΓ΋
    ந৅౓ͷ௿͍΋ͷΛஔ͘

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  42. w ૚ಉ࢜ͷґଘؔ܎

    ্૚͔ΒԼ૚ʹର͢Δݺͼग़͠͸0,

    Լ૚͔Β্૚ʹର͢Δݺͼग़͠͸/(
    w υϝΠϯͷू໿୯ҐͰϦϙδτϦΛ࡞Δ
    w ϦϙδτϦΛܦ༝͠ͳ͍Ͱଞͷू໿Λऔಘ͠ͳ͍
    w ϦϙδτϦ͔ΒϦϙδτϦ΁ͷݺͼग़͠͸ɺυϝΠ
    ϯͷτοϓϨϕϧύοέʔδͷґଘؔ܎ΛकΔ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  43. ϦϑΝΫλϦϯά

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  44. w ৗʹϦϑΝΫλϦϯά͢Δ
    w ϘʔΠεΧ΢τϧʔϧ

    खΛೖΕΔ࣌͸ʮདྷͨ࣌ΑΓ΋ඒ͘͠ʯ
    w ʮ࢖͍ࠐΜͩάϩʔϒʯ

    &SJD&WBOTΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭ

    ୈ෦ਂ͍Ϟσϧ͠ͳ΍͔ͳઃܭ

    ϦϑΝΫλϦϯάʹΑΓྑ͘มߋ͞ΕΔ৔ॴ͕ࣗવͱॊೈͳߏ଄ʹͳΔ
    w ӅΕ͍ͯΔ֓೦Λ୳͢

    &SJD&WBOTΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭ

    ষ҉໧తͳ֓೦Λ໌ࣔతʹ͢Δ


    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  45. υϝΠϯΦϒδΣΫτͷίʔυ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  46. HFUUFS
    w ΦϒδΣΫτʹ࢓ࣄΛͤ͞ΔͨΊʹɺॻ͔ͳ͍
    w ಺෦ϑΟʔϧυͷ஋͕ݟͨ͘ͳͬͨΒɺͦͷʮϑΟʔ
    ϧυ஋Λ࢖͏ϩδοΫΛͦͷΦϒδΣΫτࣗ਎ʹ࣋
    ͨͤΒΕͳ͍͔ʯΛߟ͑Δ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  47. ίϯετϥΫλ
    w جຊతʹؔ৺ࣄͷ֎ͳͷͰԼʹ௥͍΍Δ
    w ΦϒδΣΫτͷओ໾͸ϑΟʔϧυͱɺͦΕΛ࢖ͬͯ
    Ճ޻ɺ൑அΛߦ͏ϩδοΫΛ࣋ͭϝιου
    w ҙਤͷද໌͸ϑΝΫτϦϝιουͰ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  48. ࣗಈςετ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  49. Ϟσϧͷࣗಈςετ
    w ࠷ॳʹܕͷੈքͰղܾͰ͖ͳ͍͔Λߟ͑Δ
    w ࣍ʹߏ଄ͰղܾͰ͖ͳ͍͔Λߟ͑Δ
    w Ͳ͏͠Α͏΋ͳ͍৔߹͸ςετΛॻ͘

    جຊతʹॻ͔ͳ͍
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  50. +BWBͷجຊతͳࣄ

    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  51. DDD@F;ͭ͏ͷ+BWBίʔσΟϯάͰݕࡧ

    JSPG͞ΜͷࢿྉΛݟ͍ͯͩ͘͞
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  52. ΦϒδΣΫτࢦ޲
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  53. ͜Μͳຊ͕݄೔ʹ

    ग़·͢ɻ
    ಡॻձ͍ͨ͠
    IUUQHJIZPKQCPPL
    νʔϜͰڞ༗͓ͯ͘͜͠ͱ

    View full-size slide

  54. ීஈ࢖͍ͷҙຯ

    View full-size slide

  55. w গͳ͘ͱ΋ࢲ͸ීஈ͔Β΍͍ͬͯͳ͍͜ͱΛෳࡶͳ
    ΋ͷΛݟ͚ͭͨͱ͖͚ͩʹग़དྷΔͱ͸ࢥ͑ͳ͍
    w খͯ͘͞୯७ͳ։ൃͰ΋஌ࣝͷ֬ೝɾ෼ੳɾϓϩά
    ϥϛϯάͷαΠΫϧΛීஈ͔ΒԿ౓΋ճ͢
    w ͍ͭͰ΋ͲΜͳ࣌Ͱ΋Ͱ͖ΔΑ͏ʹجຊΛ܁Γฦ͠
    ͯ࠷௿඼࣭Λఈ্͓͛ͯ͘͠

    View full-size slide