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
9k
普段使いのDDD
#KanJavaPartyA2
haljik
June 24, 2017
Tweet
Share
More Decks by haljik
See All by haljik
develop-with-domain-expert
haljik
1
1k
ドメイン駆動設計の紹介
haljik
0
80
Isolating-the-domainの紹介
haljik
3
1.6k
実録Spring MVC
haljik
10
4.7k
ドメイン駆動設計を軽快に実践するための工夫
haljik
22
7.5k
Other Decks in Programming
See All in Programming
EventSourcingの理想と現実
wenas
6
2.3k
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
C++でシェーダを書く
fadis
6
4.1k
最新TCAキャッチアップ
0si43
0
140
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
280
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Typedesign – Prime Four
hannesfritz
40
2.4k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Thoughts on Productivity
jonyablonski
67
4.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Statistics for Hackers
jakevdp
796
220k
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 ͍ͭͰͲΜͳ࣌ͰͰ͖ΔΑ͏ʹجຊΛ܁Γฦ͠ ͯ࠷࣭Λఈ্͓͛ͯ͘͠