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
社内勉強会_20180418_DDD_1章
Search
RyoWATANABE
April 18, 2018
0
41
社内勉強会_20180418_DDD_1章
RyoWATANABE
April 18, 2018
Tweet
Share
More Decks by RyoWATANABE
See All by RyoWATANABE
あるあるLT_Android採用編_20191224.pdf
nabetaro_jp
0
530
developers_boost_組織とのパーフェクトマッチを目指して_201911.pdf
nabetaro_jp
0
260
あるあるLT_Android
nabetaro_jp
1
410
AndroidあるあるLT_20190122.pdf
nabetaro_jp
0
220
社内Android共有定例会資料
nabetaro_jp
0
45
社内勉強会資料_Flux
nabetaro_jp
0
89
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
8.9k
GitHub's CSS Performance
jonrohan
1030
460k
The Invisible Side of Design
smashingmag
298
50k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Faster Mobile Websites
deanohume
305
30k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
How to Ace a Technical Interview
jacobian
276
23k
Gamification - CAS2011
davidbonilla
80
5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
410
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Transcript
ΤϦοΫɾΤϰΝϯζͷ υϝΠϯۦಈઃܭ ιϑτΣΞͷ֩৺ʹ͋Δෳࡶ͞ʹཱ͔ͪ͏
“͜ͷຊɺࢥྀਂ͍ιϑτΣΞ։ൃऀશһͷඞܞॻͰ͋Δɻ” Kent Beck
DDD = Domain-Driven Design (υϝΠϯۦಈઃܭʣ
DDDͱ • υϝΠϯࣝͱIT։ൃΛεϜʔζʹͭͳ͙࣮ફతࣝͷๅݿ • ݱͷͱ։ൃνʔϜͱιϑτΣΞΛͭͳ͙ڞ௨ݴޠΛ ͬ͘͡Γͱ࡞Γͳ͕Β։ൃΛਐΊ͍ͯ͘ํ๏
ίʔϯΣΠͷ๏ଇ • ιϑτΣΞͷΞʔΩςΫνϟνʔϜͷߏͱ૬ࣅܗͰ͋ Δ • ιϑτΣΞͷσβΠϯ = νʔϜͷσβΠϯ
DDDͷݪଇ • ίΞυϝΠϯʹूத͢Δࣄ • υϝΠϯͷ࣮ફऀͱιϑτΣΞͷ࣮ફऀʹΑΔతͳڞ ಉ࡞ۀΛ௨ͯ͡ɺϞσϧΛ୳ٻ͢Δࣄ • ໌ࣔతͳڥք͚ͮΒΕͨίϯςΩετͷ෦ͰɺϢϏΩλε ݴޠΛޠΔࣄ
ઃܭΛޭͤ͞Δલఏ݅ • ιϑτΣΞϓϩδΣΫτʹ͓͍ͯɺҰ൪ͷযɺυϝΠϯͱ υϝΠϯϩδοΫʹ߹Θͤͳ͚ΕͳΒͳ͍ • ෳࡶͳυϝΠϯͷઃܭɺϞσϧʹج͔ͮͳ͚ΕͳΒͳ͍ • ෳࡶͳͷυϝΠϯͦͷͷɺ͢ͳΘͪϢʔβʔͷ׆ಈϏδω εͳͷͰ͋Δ
ୈ̍෦ υϝΠϯϞσϧΛػೳͤ͞Δ
Ϟσϧͱʁ • બͼൈ͔Εͯγϯϓϧʹ͞ΕɺҙਤతʹΈཱͯΒΕͨࣝ ͷදݱํ๏
υϝΠϯϞσϧͱʁ • υϝΠϯΤΩεύʔτͷ಄ͷதʹ͋Δ୯ͳΔ͚ࣝͩͰͳ͘ɺ ͦͷ͕ࣝݫີʹߏ͞Εɺબͼൈ͔ΕͯநԽ͞Εͨ ͷ data class Servant( var id:
Long, var imageUrl: String?, var mClass: String, var rare: String, var name: String, var attr1: String, var attr2: String, var attr3: String, var targetUrl: String, var characteristic: String? )
Ϟσϧͷ༗༻ੑ • Ϟσϧͱઃܭͷ֩৺͕૬ޓʹܗ͠߹͏ • ϞσϧνʔϜϝϯόશһ͕༻͢Δݴޠͷج൫Ͱ͋Δ • Ϟσϧͱৠཹ͞ΕͨࣝͰ͋Δ
ιϑτΣΞͷ֩৺ • υϝΠϯʹؔͨ͠ΛϢʔβͷͨΊʹղܾ͢Δೳྗ • ։ൃऀυϝΠϯʹ಄͠ͳ͚ΕͳΒͳ͍ • ϞσϦϯάεΩϧΛݚ͗·͠ɺυϝΠϯઃܭʹਫ਼௨͢Δ͜ ͱ͕ཁٻ͞ΕΔ • ෳࡶ͞ʹਅਖ਼໘͔Βཱ͔ͪΘͳͯ͘ͳΒͳ͍
ͦ͏͠ͳ͚Εɺ త֎ΕͳιϑτΣΞΛ࡞ͬͯ͠·͏ةݥ͕͋Δ͔Βͩ
ୈ̍ষ ࣝΛטΈࡅ͘
ࣝͷטΈࡅ͖ • ಠΓͰߦ͏࡞ۀͰͳ͍ • ։ൃऀͱυϝΠϯΤΩεύʔτ͕ڞಉͯ͠ߦ͏
Ϟσϧͷࡐྉ • υϝΠϯΤΩεύʔτͷ಄ͷத • طଘγεςϜͷϢʔβ • ؔ࿈͢ΔϨΨγʔγεςϜ • ಉҰυϝΠϯͷผϓϩδΣΫτʹ͓͚Δٕज़νʔϜͷաڈͷ ܦݧ
ཹҙ • ࣮Λ௨ͨ͡ϑΟʔυόοΫϧʔϓʹΑͬͯϞσϧ͑Β Ε͍ͯ͘
ΥʔλʔϑΥʔϧख๏ • ϑΟʔυόοΫ͕ͳ͍ͨΊৠཹ͞Εͳ͍ • ࣝҰํʹྲྀΕΔ͚ͩͰɺੵ͞Εͳ͍
ϓϩάϥϚ͕υϝΠϯʹڵຯ͕ͳ͍ • ΞϓϦ͕ԿΛ͖͔͚ͩ͢Λௐɺͦͷഎޙʹ͋Δݪཧʹ ҙΛΘͳ͍ • ʹʼڧྗͳ৽ػೳ͕ݱΕΔͱ͍͏ஈ֊ʹɺܾͯ͠౸ୡ͢ Δ͜ͱ͕ͳ͍
υϝΠϯϞσϧΛઈ͑ͣվྑ͢Δ • ։ൃऀɺ͕ࣗྗΛି͍ͯ͠ΔϏδωεʹ͓͚Δॏཁͳݪཧ Λशಘ͢Δ͜ͱΛڧ͍ΒΕɺػցతʹػೳΛͭ͘Γͩ͢͜ͱ͕ ͳ͘ͳΔ • υϝΠϯΤΩεύʔτɺࣗͷ͍ͬͯΔ͜ͱΛৠཹͯ͠ຊ ࣭Λநग़͢ΔΑ͏ʹڧ͍ΒΕΔ͜ͱͰɺࣗͷཧղΛਫ਼៛ʢਫ਼ ີʣʹ͠ɺιϑτΣΞ͕ඞཁͳ֓೦ͷਖ਼֬͞Λཧղ͢ΔΑ͏ ʹͳΔ
• υϝΠϯΤΩεύʔτ͕Ϟσϧʹରͯ͠ใΛఏڙ͍ͯ͠Δ ͔ΒɺϞσϧʹϏδωεʹؔ͢Δਂ͍͕ࣝө͞Ε͍ͯ Δ • ʹʼͦͷந͕Ϗδωεͷਅͷݪཧͳͷͩ
Ϟσϧ͕ͨΒ͢Ըܙ • ϓϩδΣΫτΛྲྀΕଓ͚ΔใΛମܥԽ͢Δ • ཁੳͷ෭࡞༻ͱͯ͠ϓϩάϥϛϯάઃܭʹਂ͘૬ޓ࡞༻ ͢Δ • ঢ়گ͕ΑΓ໌֬ʹཧղͰ͖ΔΑ͏ʹͳΓϞσϧ͕ਫ਼៛Խ͞ΕΔ • =>ϞσϧݫີͰͳ͚ΕͳΒͳ͍
ϓϩδΣΫτʹؔ͢Δࣝʹ͍ͭͯ • ιϑτΣΞΛॻ͖࢝ΊΔͱ͖ɺզʑରΛेʹཧղ ͍ͯ͠ΔΘ͚Ͱͳ͍ • యܕతͳઃܭΞϓϩʔνͷ߹ɺίʔυͱυΩϡϝϯτ ۤ࿑ͯ͠खʹೖΕͨࣝΛՁͷܗͰදݱ͠ͳ͍ʢϞσϧͰ ͳ͍ʣ͔Βޱ಄Ͱͷঝ్͕Εͨ߹ɺࣦࣝΘΕΔ
ܧଓతֶश • ࣗͨͪͷࣝΛҙࣝతʹҭͯΔ • ։ൃऀʹͱͬͯͲΏ͜ͱ • ٕज़తͳࣝΛ্ͤ͞Δ͜ͱ • υϝΠϯʹ͍ͭͯਅʹֶश͢Δ͜ͱ
ਂ͍Ϟσϧ • ཱͭϞσϧ͕͙͢ʹݟ͔ͭΔදʹ͋Δ͜ͱΊͬͨʹ ͳ͍ • ͍͍ͨͯͷ߹ཁૉΛഇغ͢ΔɺҧͬͯࢹͰݟΔ͜ͱʹͳ Δ • ʹʼͷ֩৺Λͭ͘Α͏ͳ͏·͍ந͕ݱΕΔ
ͭͮ͘