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

ドメイン駆動設計の紹介

haljik
September 27, 2018

 ドメイン駆動設計の紹介

haljik

September 27, 2018
Tweet

More Decks by haljik

Other Decks in Programming

Transcript

  1. ΤϦοΫɾΤϰΝϯεͷ
 υϝΠϯۦಈઃܭ͔Β w ·͕͖͑ʙୈ෦υϝΠϯϞσϧΛػೳͤ͞Δ w ·͕͖͑ w ୈষɿ஌ࣝΛ͔Έࡅ͘ w ୈষɿίϛϡχέʔγϣϯͱݴޠͷ࢖͍ํ

    w ୈষɿϞσϧͱ࣮૷Λ݁ͼ͚ͭΔ w ୈ෦Ϟσϧۦಈઃܭͷߏ੒ཁૉ w ୈষɿυϝΠϯΛִ཭͢Δ w ୈষɿιϑτ΢ΣΞͰදݱ͞ΕͨϞσϧ w ୈষɿݴޠΛ࢖༻͢Δ w ୈ෦ΑΓਂ͍ಎ࡯΁޲͔͏ϦϑΝΫλϦϯά w ୈষɿ͠ͳ΍͔ͳઃܭ͔Βʮ֓೦ͷྠֲʯ w ୈ෦ઓུతઃܭ w ୈষɿڥք͚ͮΒΕͨίϯςΩετ w ୈষɿৠཹ
  2. ୈ̎ষ ίϛϡχέʔγϣϯͱݴޠͷ࢖͍ํ w ٕज़༻ޠ͸࢖Θͳ͍ w ͍ͭͰ΋Ͳ͜Ͱ΋ϢϏΩλεݴޠ w ੠Λग़ͯ͠ϞσϦϯά͢Δ w ҧ࿨ײ΍͍͋·͍͞Λݕ஌

    w ಉ͡ҙຯͷΑ͏ʹฉ͑͜Δҧ͏ݴ༿Λݕ஌
 ʢ΋͔ͨ͠͠Β࢖ΘΕΔจ຺͕ҧ͏͔΋͠Εͳ͍ʣ w ̍ͭͷνʔϜʹ̍ͭͷݴޠ
 ίϯ΢ΣΠͷ๏ଇͱ͔̐ষͷڥք෇͚ΒΕͨίϯςΩετʹͭͳ͕Δ
  3. ୈষ ݴޠΛ࢖༻͢Δ w ϞσϧۦಈઃܭΛߦ͍ͬͯ͘தͰɺग़͖ͯͨ໰୊ʹͲ͏ύλʔϯΛద༻͍͔͕ͯ͘͠ඳ͔Ε ͍ͯΔ w ߦΘΕ͍ͯΔҰ࿈ͷαΠΫϧ υϝΠϯΛִ཭͢Δ ΤϯςΟςΟͱ஋ΦϒδΣΫτΛ۠ผ͢Δ ؔ࿈Λઃܭ͢Δ

    ू໿ͷڥքͱϦϙδτϦΛબ୒ʢ͜Ε͸ೖग़ྗͷؔ৺ࣄ৭͕ڧ͍ͷͰॳظͷϞσϧͰ͸ؾʹ͠ͳ ͯ͘Α͍͔ͳʣ γφϦΦΛ΢ΥʔΫεϧʔ͢Δʢ੠ʹͩͯ͠ϞσϦϯάʣ ϦϑΝΫλϦϯά ৽ػೳಋೖ ૯߹ԋशతͳ಺༰ɻ͜ΕΛΠςϨʔςΟϒʹ΍Δ
  4. ୈষ ͠ͳ΍͔ͳઃܭ w ֓೦ͷྠֲ 1 
 ৽ͨͳཁٻ͕དྷΔͨͼɺͦͷ࣌఺ͷϞσϧͰ͸͗ͪ͜ͳ͔͘͠දݱͰ͖ͳ͔ͬ ͨΓɺ͋ͪͪ͜Λมߋ͠ͳ͚Ε͹ରԠͰ͖ͳ͔ͬͨΓ͢Δ෦෼Λɺදݱ͕γ ϯϓϧʹɺมߋ͕؆୯Ͱ҆શʹͳΔΑ͏ʹϦϑΝΫλϦϯάΛ܁Γฦ͢ɻ݁ Ռͱͯͦ͠ͷ෦෼͕͠ͳ΍͔ʹͳ͍ͬͯ͘ɻͦͷաఔͰ֓೦ͷྠֲ͕ݟ͑ͯ

    ͘Δʢ͋Δ͍͸ݟ͚ͭʹ͍͘ʣ w มߋ͕Ԡٸॲஔʹ͗͢ͳ͍ͷ͔ɺ҉໧తͳར༻ऀͷؔ৺ࣄ΍ɺߏ଄Λൃݟ ͢Δ͖͔͚ͬʹͳΔ΋ͷͳͷ͔Λࣗ໰͢Δ ʢʮୈ̕ষ҉໧తͳ֓೦Λ໌ࣔతʹ͢Δʯ΍ɺʮୈষৠཹʯʹ΋ͭͳ͕ Δɻ୯७ʹॏෳΛল͍ͨΓ͢Δٕज़తͳϦϑΝΫλϦϯάͰ͸ͳ͘υϝΠϯ ͷݴ༿ʹͳΓ͏Δ֓೦Λݟ͚ͭग़͢ॏཁͳϓϥΫςΟεɻίʔυ͔ΒͷϑΟʔ υόοΫΛಘΔखஈɻʣ
  5. ୈষ ڥք͚ͮΒΕͨίϯςΩετ w ॏෳͨ֓͠೦ɺِಉ଒ޠͷݕ஌ʢձ࿩ॏཁʣ w ݱ࣮ੈքͷಉ͡΋ͷΛҟͳΔଆ໘͔ΒΈͨͱ͖ʹ໊લ΋͘͠͸ ໾ׂ͕มΘΔɻ͜ΕΒΛಉ͡Ϟσϧͱͯ͠ѻ͏ͷ͔Ͳ͏͔ݕ౼͢ Δ w ୯ҰϞσϧମܥͷதͰ୯ʹݺͼ෼͚ΒΕͨΓҟͳΔ֓೦ͱͯ͠ந

    ग़Ͱ͖ΔέʔεͱɺଞͷཁૉΛҾ͖࿈ΕͯผͷϞσϧମܥ͕΋͏ ̍ηοτͰ͖͕͋ΔΑ͏ͳέʔε͕͋Δ w ผͷϞσϧମܥ͕ग़དྷΔέʔε͕ڥք͚ͮΒΕͨίϯςΩετʜ ͜ͷຊͷதͰ͸ۤ೑ͷࡦͬΆ͍ॻ͔ΕํΛ͍ͯ͠ΔΑ͏ʹݟ͑Δ