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
testcontainers のススメ
sgash708
1
120
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
110
Spatial Rendering for Apple Vision Pro
warrenm
0
110
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
Jakarta EE meets AI
ivargrimstad
0
260
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
From Translations to Multi Dimension Entities
alexanderschranz
2
130
テストコード書いてみませんか?
onopon
2
140
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
210
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
290
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Code Reviewing Like a Champion
maltzj
520
39k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Being A Developer After 40
akosma
87
590k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Faster Mobile Websites
deanohume
305
30k
For a Future-Friendly Web
brad_frost
175
9.4k
Practical Orchestrator
shlominoach
186
10k
Optimising Largest Contentful Paint
csswizardry
33
3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
How to Ace a Technical Interview
jacobian
276
23k
Docker and Python
trallard
42
3.1k
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 ͍ͭͰͲΜͳ࣌ͰͰ͖ΔΑ͏ʹجຊΛ܁Γฦ͠ ͯ࠷࣭Λఈ্͓͛ͯ͘͠