Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
普段使いのDDD
Search
haljik
June 24, 2017
Programming
21
9.1k
普段使いのDDD
#KanJavaPartyA2
haljik
June 24, 2017
Tweet
Share
More Decks by haljik
See All by haljik
develop-with-domain-expert
haljik
1
1.1k
ドメイン駆動設計の紹介
haljik
0
91
Isolating-the-domainの紹介
haljik
3
1.7k
実録Spring MVC
haljik
10
4.8k
ドメイン駆動設計を軽快に実践するための工夫
haljik
22
7.5k
Other Decks in Programming
See All in Programming
goにおける コネクションプールの仕組み を軽く掘って見た
aronokuyama
0
140
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
1.1k
Django for Data Science (Boston Python Meetup, March 2025)
wsvincent
0
240
OUPC2024 Day 1 解説
kowerkoint
0
400
Going Structural with Named Tuples
bishabosha
0
170
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
130
Denoでフロントエンド開発 2025年春版 / Frontend Development with Deno (Spring 2025)
petamoriken
1
1.3k
NestJSのコードからOpenAPIを自動生成する際の最適解を探す
astatsuya
0
190
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
0
980
Go1.24で testing.B.Loopが爆誕
kuro_kurorrr
0
170
爆速スッキリ! Rspack 移行の成果と道のり - Muddy Web #11
dora1998
1
150
WordPress Playground for Developers
iambherulal
0
120
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Making Projects Easy
brettharned
116
6.1k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Why Our Code Smells
bkeepers
PRO
336
57k
Product Roadmaps are Hard
iamctodd
PRO
52
11k
Being A Developer After 40
akosma
90
590k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.7k
KATA
mclloyd
29
14k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
500
Transcript
ීஈ͍ͷ%%% ,"/+"7"1"35: !IBMKJL
ࣗݾհ w 5XJUUFS!IBMKJL w ໊લɿՏ্࢘ʢ͔Θ͔Έ͍ͤ͡ʣ w ϑϦʔϥϯεͷ+BWBϓϩάϥϚ w ؔ%%%KBWBओ࠵
͜ͷࢿྉʹ͍ͭͯ w ࢲ͕ৗࠒ͔ΒυϝΠϯۦಈઃܭʹ͍ͭͯߟ͍͑ͯ ΔࣄΛݴޠԽͨ͠ͷͰɺͦΕҎ্ͷͷͰ͋Γ ·ͤΜ w +BWB͕લఏͰ͋Γ·͕͋͢·Γ+BWBͷ͠· ͤΜ w ΦϒδΣΫτࢦͰ͢
w ϚΠΫϩαʔϏεͱ͔$234ͱ͔ͷ͋Γ·ͤΜ
ࠓ͢ࣄ w υϝΠϯۦಈઃܭ͕ඪͱ͍ͯ͠Δ͜ͱ w υϝΠϯۦಈઃܭ͕લఏͱ͍ͯ͠Δ͜ͱ w ʮυϝΠϯͰۦಈ͢Δʯͱ͍͏͜ͱͷ࣮ࡍ w νʔϜͰڞ༗͓ͯ͘͜͠ͱ w
࣮ࡍʹײͨ͡ޮՌ w ʮීஈ͍ʯͱ͍͏͜ͱ
υϝΠϯۦಈઃܭ͕ඪ ͱ͍ͯ͠Δ͜ͱ
ॊೈͰ֦ுੑʹΜͩ ιϑτΣΞ
मਖ਼֦ு͕ࠔʹͳͬͯ ͠·ͬͨ߹ࣦഊ
Ͳ͏ͳ͍ͬͯΕྑ͍͔ʁ ར༻ऀ͕ʮ͜͜ʯΛʮ͜͏ʯ͍ͨ͠ͱ͍ ͏ཁʹରͯ͠ɺʮ͜͜ʯΛʮ͜͏ʯ͢ Δ͚ͩͰมߋͰ͖ΔΑ͏ʹͳ͍ͬͯΕ ྑͦ͞͏
υϝΠϯۦಈઃܭ͕લఏ ͱ͍ͯ͠Δͷ
։ൃνʔϜ͕ར༻ऀͷ׆ಈʹؔ͢Δ ࣝମܥΛഎෛ͍ࠐΉ͜ͱ w ୯ͳΔࣝͰͳ͘ମܥ CPEZPGLOPXMFEHF˞ w ͨͩΔ͚ͩͰͳ͘എෛࠐΉ CSJOHUPCFBS˞ ˞&SJD&WBOT
%PNBJO%SJWFO%FTJHO "EEJTPO8FTMFZ1SPGFTTJPOBM൛ ୈ̍෦ͷং൫
ۀ͠ͳ͍ w ੳɾઃܭऀͱϓϩάϥϚΛ͚ͳ͍ ༁ͤͣؔ৺ࣄͱϓϩάϥϜͷ୯ҐΛҰகͤ͞Δ w Ϟσϧͷ࡞ऀͱϞσϧͷར༻ऀΛ͚ͳ͍ ϞσϧͱͦΕΛར༻͢ΔଆͷίʔυɺϞσϧʹ৽ ͨͳ͕ࣝΓࠐ·ΕΔʹมߋ͞ΕΔ
ΠςϨʔςΟϒͳϓϩηε w Ϟσϧ։ൃऀͷࣝͱͱʹ͢Δ w ͪΐͬͱ໊ͨ͠લมߋͰ͢ΒϞσϧΛར༻͢Δଆͷ ίʔυʹٴ͢Δ w ϓϩάϥϛϯάͷϓϥοτϑΥʔϜʹΑΔ੍ͷΑ ͏ͳͷવϞσϧʹϑΟʔυόοΫ͕͔͔Δ w
ͦ͏Ͱͳ͍ͱ࣮༻ੑͷͳ͍ϞσϧʹͳΔ
ʮυϝΠϯͰۦಈ͢Δʯ ͱ͍͏͜ͱͷ࣮ࡍ
ར༻ऀͷؔ৺ࣄυϝΠϯ
ར༻ऀͷ͍͏ʮ͜͜ʯΛ͜͏ ͍ͨ͠ͷʮ͜͜ʯ͕ίʔυ ্ͷͲ͜Λࢦ͢ͷ͔ʁ
ར༻ऀͷؔ৺ࣄͱҧ͏୯ҐͰ ϓϩάϥϛϯάͯ͠͠·͏ͱม ߋͷӨڹൣғ༧Ͱ͖ͳ͍
ڞ௨Խͱ͔
աͳநԽͱ͔
ٕज़ۦಈͱ͔
ը໘ۦಈͱ͔
͍Ζ͍Ζ͋Δ͚Ͳ ༧֎ͷӨڹ༧֎ͷί ετʹͳΓൃలΛ્͢Δ
͔ͩΒ
ར༻ऀͷؔ৺ࣄʹϓϩάϥϛϯάͷجຊ ୯ҐΛ͋ΘͤΔ ؔ৺ࣄͷ୯ҐͰஅɺՃϩδοΫΛ࣋ ͪɺͦΕΒͷϩδοΫʹۦಈ͞ΕΔιϑ τΣΞʹ͢Δ
υϝΠϯϞσϧʹۦಈ͞Ε ΔΞϓϦέʔγϣϯΛ࡞Δ
υϝΠϯϞσϧͰۦಈ͞ΕΔ ΞϓϦέʔγϣϯΛ࡞Δʹ υϝΠϯϞσϧ͕࣋ͭஅɺՃϩδοΫʹରͯ͋͠ ΒΏΔͱ͜Ζ͔ΒΞΫηεͰ͖ΔΑ͏ͳΞʔΩςΫνϟ Λ࠾༻͠ɺυϝΠϯϞσϧʹஅɺՃϩδοΫΛू ΊΔඞཁ͕͋Δ
νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ڥք͚ͮΒΕͨίϯςΩετ w ίϯςΩετͷ֓ཁϞσϦϯά w ϓϩάϥϛϯά্ͷݪଇ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ڥք͚ΒΕͨίϯςΩετ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ڥք͚ͮΒΕͨίϯςΩετ w ίϯςΩετʹࢹ࠲ ݻ༗໊ࢺҎ֎·ͣࢹ࠲Λ֫ಘ͠ͳ͍ͱ໊લ͕ܾ·Βͳ͍ w ࢹ࠲ͱγεςϜར༻ऀͱར༻తͷʮΈ߹Θͤʯ ྫʣస৬αΠτɿʮاۀ͕ࣗࣾʹ͋ͬͨࣾһΛ୳͢ҝʯʮٻ৬ ऀ͕ࣗʹ͋ͬͨస৬ઌاۀΛ୳͢ҝʯͳͲͳͲ w ࢹ࠲͝ͱʹϞσϦϯάͷ໊લۭؒΛ͚ͯɺͦͷࢹ࠲͔ΒΈͨ
Ϟσϧͷಋग़ʹूத͢ΔʹίϯςΩετʹಛԽ͢Δ ྫʣస৬αΠτɿʮاۀʯͱʮٻ৬ऀʯͱ͍͏໊લۭؒʹ͚ Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ࢹ࠲ͰࣝΛཧ ࢹ࠲͕ίϯςΩετʹͳΔ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ࢹ࠲ͷݟ͚ͭํ w ࡞Ζ͏ͱ͍ͯ͠ΔαʔϏεγεςϜͷར༻ऀΛચ ͍ग़͢ ਓͷׂͩͬͨΓγεςϜͩͬͨΓ͢Δ w ͦΕͧΕͷར༻ऀ͕ԿΛతʹͦͷγεςϜΛ͏ ͷ͔Λ໌֬ʹ͢Δ w
త͕ҧ͏ͳΒผͷࢹ࠲ w త͕ಉ͡ͳΒಉ͡ࢹ࠲ʢ͔ʣ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ίϯςΩετͷ֓ཁϞσϦϯά νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ਓɺɺࣄੳ w ࣌ܥྻੳ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ਓɾɾࣄੳ ਓٻ৬ऀɺձһɺاۀͷ୲ऀ ٻਓɺاۀ ࣄݕࡧɺԠืɺεΧτ ྫɿٻਓαΠτͷٻ৬ऀΛࢹ࠲ʹͨ͠߹ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
࣌ܥྻੳ ٻ৬ऀɺاۀ͕ಠཱͯ͠·ͣ͋Δ ٻ৬ऀ͕ձһొΛ͓͜ͳ͍ձһʹͳΔ اۀ͕ٻਓΛొ͢Δ اۀ͕ٻਓΛఴͨ͠εΧτΛձһʹૹΔ
ձһاۀ͔ΒεΧτΛड͚ͱΔ ձһεΧτʹԠื͢Δ ͳͲಠཱͯ͋͠ΔਓΛ·ͣฒͦΕΒ͕ى͜͢ओཁͳΠϕϯτΛ࣌ܥྻʹฒΔ ྫɿٻਓαΠτͷٻ৬ऀΛࢹ࠲ʹͨ͠߹ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϞσϧԽͨ͠ͷ ਓɺɺࣄੳͰग़ͨཁૉΛ࣌ ܥྻੳͰ͚ؔ͠ɺґଘͷ ํΛܾΊͨঢ়ଶ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϞσϧΛίʔυͰ ͜ͷϨϕϧͰϞσϧͷτοϓϨϕϧύοέʔδ ͷߏͰදݱ͢Δ EPNBJONPEFM DBOEJEBUF ٻ৬ऀ DPNQBOZ اۀ
P⒎FS ٻਓ NFNCFS ձһ TDPVU εΧτ BQQMJDBUJPO Ԡื ύοέʔδؒͷґଘํͦͷ··෦ͷΦϒδΣ Ϋτ͕ύοέʔδΛލ͙ࡍͷґଘํʹ͢Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϙΠϯτ w ࢹ࠲Λ֫ಘ͢Δ͜ͱͰɺͦͷࢹ࠲͔ΒΈͯෆཁͳ ͷΛ͗མͱ͠ɺॏཁͳͷΛڧௐ͢Δ w ࣌ܥྻͰચ͍ग़͢ґଘͷํॏཁͳͷ ͋ΔλΠϛϯάͰଘࡏ͠ͳ͍ͷࢀরͰ͖ͳ͍ͷ Ͱ͜ΕΛ่͢ͱ࣋ͬͯΔ͔͍࣋ͬͯͳ͍͔ͱ͍͏ঢ় ଶ͕૿͑ͯෳࡶ͕Ճ
νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϓϩάϥϛϯά্ͷݪଇ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϓϩάϥϛϯά্ͷݪଇ w ΞʔΩςΫνϟ w ϦϑΝΫλϦϯά w υϝΠϯΦϒδΣΫτͷίʔυ w Ϟσϧͷࣗಈςετ w
+BWBͷجຊతͳ͜ͱ w ΦϒδΣΫτࢦ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ΞʔΩςΫνϟ ̏ʴυϝΠϯϞσϧ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
̏ υϝΠϯϞσϧ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w υϝΠϯʹଞͷ͕̏ґଘ͍ͯ͠Δҙຯ υϝΠϯ͕શͯΛ੍ޚ͢Δҝ υϝΠϯʹϩδοΫΛूΊΔҝ w ϓϨθϯςʔγϣϯ ը໘ભҠΞϓϦέʔγϣϯͷݺͼग़͠ʹప͢Δ w ΞϓϦέʔγϣϯ υϝΠϯΦϒδΣΫτͷૢ࡞ͱ
ΠϯϑϥετϥΫνϟͷݺͼग़͠ʹప͢Δ w ΠϯϑϥετϥΫνϟ υϝΠϯͰఆٛ͞ΕΔϦϙδτϦΠϯλʔϑΣʔεͷ࣮Λஔ͘ 3%#,74ͷૢ࡞ɺଞ"1*ͷݺͼग़͠ͳͲɺར༻ऀͷؔ৺ࣄΑΓ நͷ͍ͷΛஔ͘ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ಉ࢜ͷґଘؔ ্͔ΒԼʹର͢Δݺͼग़͠0, Լ͔Β্ʹର͢Δݺͼग़͠/( w υϝΠϯͷू୯ҐͰϦϙδτϦΛ࡞Δ w ϦϙδτϦΛܦ༝͠ͳ͍ͰଞͷूΛऔಘ͠ͳ͍ w ϦϙδτϦ͔ΒϦϙδτϦͷݺͼग़͠ɺυϝΠ
ϯͷτοϓϨϕϧύοέʔδͷґଘؔΛकΔ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ϦϑΝΫλϦϯά νʔϜͰڞ༗͓ͯ͘͜͠ͱ
w ৗʹϦϑΝΫλϦϯά͢Δ w ϘʔΠεΧτϧʔϧ खΛೖΕΔ࣌ʮདྷͨ࣌ΑΓඒ͘͠ʯ w ʮ͍ࠐΜͩάϩʔϒʯ &SJD&WBOTΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭ ୈ෦ਂ͍Ϟσϧ͠ͳ͔ͳઃܭ
ϦϑΝΫλϦϯάʹΑΓྑ͘มߋ͞ΕΔॴ͕ࣗવͱॊೈͳߏʹͳΔ w ӅΕ͍ͯΔ֓೦Λ୳͢ &SJD&WBOTΤϦοΫɾΤϰΝϯεͷυϝΠϯۦಈઃܭ ষ҉తͳ֓೦Λ໌ࣔతʹ͢Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
υϝΠϯΦϒδΣΫτͷίʔυ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
HFUUFS w ΦϒδΣΫτʹࣄΛͤ͞ΔͨΊʹɺॻ͔ͳ͍ w ෦ϑΟʔϧυͷ͕ݟͨ͘ͳͬͨΒɺͦͷʮϑΟʔ ϧυΛ͏ϩδοΫΛͦͷΦϒδΣΫτࣗʹ࣋ ͨͤΒΕͳ͍͔ʯΛߟ͑Δ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ίϯετϥΫλ w جຊతʹؔ৺ࣄͷ֎ͳͷͰԼʹ͍Δ w ΦϒδΣΫτͷओϑΟʔϧυͱɺͦΕΛͬͯ ՃɺஅΛߦ͏ϩδοΫΛ࣋ͭϝιου w ҙਤͷද໌ϑΝΫτϦϝιουͰ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ࣗಈςετ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
Ϟσϧͷࣗಈςετ w ࠷ॳʹܕͷੈքͰղܾͰ͖ͳ͍͔Λߟ͑Δ w ࣍ʹߏͰղܾͰ͖ͳ͍͔Λߟ͑Δ w Ͳ͏͠Α͏ͳ͍߹ςετΛॻ͘ جຊతʹॻ͔ͳ͍ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
+BWBͷجຊతͳࣄ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
DDD@F;ͭ͏ͷ+BWBίʔσΟϯάͰݕࡧ JSPG͞ΜͷࢿྉΛݟ͍ͯͩ͘͞ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ΦϒδΣΫτࢦ νʔϜͰڞ༗͓ͯ͘͜͠ͱ
͜Μͳຊ͕݄ʹ ग़·͢ɻ ಡॻձ͍ͨ͠ IUUQHJIZPKQCPPL νʔϜͰڞ༗͓ͯ͘͜͠ͱ
ීஈ͍ͷҙຯ
w গͳ͘ͱࢲීஈ͔Β͍ͬͯͳ͍͜ͱΛෳࡶͳ ͷΛݟ͚ͭͨͱ͖͚ͩʹग़དྷΔͱࢥ͑ͳ͍ w খͯ͘͞୯७ͳ։ൃͰࣝͷ֬ೝɾੳɾϓϩά ϥϛϯάͷαΠΫϧΛීஈ͔ΒԿճ͢ w ͍ͭͰͲΜͳ࣌ͰͰ͖ΔΑ͏ʹجຊΛ܁Γฦ͠ ͯ࠷࣭Λఈ্͓͛ͯ͘͠