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
SPAのAPI開発の「やりづらさ」をDDDとオブジェクト指向の発想で解決する
Search
Hiromi Hishida
December 11, 2020
Programming
4
2.7k
SPAのAPI開発の「やりづらさ」をDDDとオブジェクト指向の発想で解決する
PHPカンファレンス2020 前夜祭にて発表
Hiromi Hishida
December 11, 2020
Tweet
Share
More Decks by Hiromi Hishida
See All by Hiromi Hishida
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
DoctrineとPostgreSQLの便利な機能、どっちも諦めたくない!
77web
0
52
すばやく実装するための戦略とテクニック2024 / speed is power! 2024 #techramen24conf #shoyu
77web
9
4.3k
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
470
Doctrine ORMでValue Objectを扱う方法4選 #phpstudy / 4 ways to handle Value Objects with Doctrine ORM
77web
4
240
100%出しきれないのを許すスクラムチーム運営
77web
1
270
マイクロサービスがほしいと思ったときに本当に必要だったもの〜なぜ人は共通基盤の夢を見るのか〜 / why microservice
77web
5
1.6k
モデルとはなにか / what is model?
77web
7
3k
たとえば、唐揚げを揚げながらPHPコードを書く技術 #phpstudy
77web
1
400
Other Decks in Programming
See All in Programming
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
イベント駆動で成長して委員会
happymana
1
330
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
140
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Click-free releases & the making of a CLI app
oheyadam
2
120
Jakarta EE meets AI
ivargrimstad
0
220
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
900
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Ruby is Unlike a Banana
tanoku
97
11k
How to Ace a Technical Interview
jacobian
276
23k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Building Your Own Lightsaber
phodgson
103
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Transcript
CZ!XFCUI%FD BU1)1$POGFSFODF 41"ͷ"1*։ൃͷΓͮΒ͞Λ%%% ͱΦϒδΣΫτࢦͷൃͰղܾ͢Δ
w ϑϦʔϥϯεˠΧϧςοτίϛϡχ έʔγϣϯζ։ൃ෦ɺݱࡏόοΫΤ ϯυϦʔυΤϯδχΞ w ຊ4ZNGPOZϢʔβʔձʢ։ళٳ ۀঢ়ଶʜʣ w ʮਓʹΘΕΔγεςϜʯΛ࡞Γͨ ͯ͘ɺϝϯςφϏϦςΟͷߴ͍։ൃ
Λࢦͯ͠νʔϜϝϯόʔͱҰॹʹ ʑฃಆதʂ w NPUIFSPG
ର w 41"ͷ"1* w TFSWFSUPTFSWFSͷ"1*ݪଇͱͯ͠είʔϓ֎Ͱ͕͢ɺࢀߟʹͰ͖Δ෦ ͋Δ͔͠Ε·ͤΜ
ݹ͖ྑ͖ϑϩϯτΤϯυ։ൃ QIQ PO$MJDLlʜz ʢಉ͡ਓ͕Δʣ
ݱͷϑϩϯτΤϯυ։ൃ <?php @Component({}) export class MyComponent extends OnInit {...} ʢҧ͏ਓ͕Δʣ
ݹ͖ྑ͖"1*։ൃ w TFSWFSUPTFSWFSࣗࣾͷσʔλΛଞࣾʢύʔτφʔʣʹެ։͢Δ w "NB[POΞιγΤΠτ8FCαʔϏεʢݱࡏͷ1SPEVDU"EWFSUJTJOH"1*ʣ w (PPHMF.BQT"1* w (PPHMFࠂ"1* :BIPPࠂ"1*ͳͲ
w ʮݹ͖ྑ͖ʯͱॻ͖·͕ͨ͠ݱࡏͰͪΖΜੜ͖͍ͯ·͢
ݱͷ"1*։ൃ w TFSWFSUPCSPXTFSPSTFSWFSUPNPCJMFBQQࣗࣾͷσʔλΛࣗࣾͷ41"ʢϑ ϩϯτΤϯυʣʹҾ͖͢ w ݹ͖ྑ͖"1*։ൃʹͳ͍ಛघੑ͕͋Δ
41"ͷ"1*։ൃͷಛघੑ w "1*Λ࡞ΔਓͱϑϩϯτΤϯυΛ࡞Δਓʢʹ"1*Λ͏ਓʣ͕ಉ͡৫ʹଐ͠ ͓ͯΓɺ྆ऀͷࣄΛ౷߹ͯͭ͠ͷγεςϜΛ࡞Ζ͏ͱ͍ͯ͠Δ͜ͱ w ͱ͍͑ɺݱͰେاۀɾ࣏ࣗମʢΦʔϓϯσʔλʣҎ֎ͷେ ͷ։ൃऀͷߦ͏"1*։ൃ41"ͷ"1*։ൃͳͷͰɺಛघੑͰͳͦ͘ Ε͕ී௨ʁ
41"ͷ"1*։ൃͷΓͮΒ͞ w ϩδοΫͷॏෳ w τϥϯβΫγϣϯͰ͖ͳ͍ w ͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁʂ w O
ϩδοΫͷॏෳ w όοΫΤϯυͱϑϩϯτΤϯυͷ྆ํʹಉ͡ϩδοΫ͕ݱΕΔ
ϩδοΫͷॏෳ
ϩδοΫͷॏෳ (&5BQJJUFNT 0, \ lOBNFzzQIQDPOεςοΧʔz lQSJDFz ^ MFUQSJDFEBUBQSJDF
QSJDFQSJDF
ϩδοΫͷॏෳ w όοΫΤϯυʹଘࡏ͢ΔϩδοΫόοΫΤϯυଆͰӅṭ͢Δ w ϑϩϯτΤϯυϑϩϯτΤϯυͷؔ৺ࣄʹ͍͠ w Ξχϝʔγϣϯ w Ϋϩεϒϥβ w
69
ϩδοΫͷॏෳ (&5BQJJUFNT 0, \ lOBNFzzQIQDPOεςοΧʔz lOFUQSJDFz lUBYz
lQSJDFz ^ MFUQSJDFEBUBQSJDF QSJDFOFUQSJDF
τϥϯβΫγϣϯͰ͖ͳ͍ w αʔόʔଆͷঢ়ଶ͕มԽ͢ΔͷΛࢭΊΒΕͳ͍
τϥϯβΫγϣϯͰ͖ͳ͍
τϥϯβΫγϣϯͰ͖ͳ͍ (&5BQJJUFNT 0, \ lTUPDLz ^ 1045BQJPSEFS 0, \ lJEz
^ 1045BQJPSEFSJUFN
τϥϯβΫγϣϯͰ͖ͳ͍ (&5BQJJUFNT 0, \ lTUPDLz ^ 1045BQJPSEFS 0, \ lJEz
^ 1045BQJPSEFSJUFN ࡏݿΕൃੜʂ
τϥϯβΫγϣϯͰ͖ͳ͍ w UFMMEPO`UBTLʮίʔώʔͪΐ͏͍ͩʂʯ w ϩδοΫͷӅṭͷҰछͰ͋Δʢ0SEFSIBT.BOZ0SEFS*UFNTͰ͋Δ͜ͱ ΛϑϩϯτΤϯυΒͳͯ͘ྑ͍ʣ w τϥϯβΫγϣϯαʔόʔͰߦ͏͜ͱ͕Ͱ͖Δ
τϥϯβΫγϣϯͰ͖ͳ͍ 1045BQJPSEFS\lJUFN@JETz<>^ ࡏݿ͕͋Ε͕ؼͬͯ͘Δ͕ɺͳ͚ΕͱͳΔ
͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁ w ಉ͡Α͏ͳσʔλΛ͏͔Βͱ"1*Λ͋ͪͪ͜Ͱ͍·Θͨ݁͠ՌɺཁΒͳ͘ ͳͬͨ"1*Λআͨͯ͘͠ଞͷ෦ʹӨڹ͕ग़ͦ͏ͰআͰ͖ͳ͍
͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁ
͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁ (&5BQJBSUJDMFT MJNJUP⒎TFU 0, < \lUJUMFzzBBBz zCPEZzzBBBz^ \lUJUMFzzCCCz zCPEZzzCCCz^
> (&5BQJBSUJDMFT MJNJU 0, < \lUJUMFzzBBBz zCPEZzzBBBz^ \lUJUMFzzCCCz zCPEZzzCCCz^ >
͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁ (&5BQJBSUJDMFT MJNJUP⒎TFU 0, < \lUJUMFzzBBBz zCPEZzzBBBz^ \lUJUMFzzCCCz zCPEZzzCCCz^
> (&5BQJBSUJDMFT MJNJU 0, < \lUJUMFzzBBBz zCPEZzzBBBz^ \lUJUMFzzCCCz zCPEZzzCCCz^ > QBHFʹ͍͚ͨ͠ͲͰ͖ͳ͍ ΘΕͳ͍CPEZσʔλΛ͍࣋ͬͯΔ
͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁ w "1*431ʹ͠Α͏ w ϑϩϯτΤϯυ͔Βݟͯผͷ༻్ͳΒ"1*ผʹ͢Δ w ͪΖΜόοΫΤϯυͰϩδοΫ͕ڞ௨ͷ෦·ͱΊΕྑ͍
͜ͷ"1*ɺଞʹͲ͜ͰΘΕ͍͚ͯͨͬʁ (&5BQJBSUJDMFT QBHF 0, < \lUJUMFzzBBBz zCPEZzzBBBz^ \lUJUMFzzCCCz zCPEZzzCCCz^
> (&5BQJMBUFTU@BSUJDMFT 0, < \lUJUMFzzBBBz^ \lUJUMFzzCCCz^ >
O w αʔόʔαΠυͰҰରଟͷϦϨʔγϣϯΛ࣋ͭΦϒδΣΫτΛऔಘ͠Α͏ͱ͠ ͯɺO ճͷϦΫΤετΛൃߦͯ͠͠·͏
O
O (&5BQJDBUFHPSJFT 0, < \lOBNFzz1)1z^ \lOBNFzz4ZNGPOZz^ > (&5BQJBSUJDMFT@DPVOU
DBUFHPSZ1)1 0, \ lDPVOUz ^ (&5BQJBSUJDMFT@DPVOU DBUFHPSZ4ZNGPOZ 0, \ lDPVOUz ^ ʢOճϦΫΤετʣ
O w O ΛղܾͰ͖ΔϨΠϠʔʢ42-ʣʹͤΔ w ܗ͕มΘΔͷͰɺผͷ໊લΛ͚ͭΔ w 2ͦΜͳ͜ͱ͍͍ͯ͠ͷʁϢʔβʔͷϝϯλϧϞσϧͱ߹Θͳ͍Μ͡Όͳ ͍ʁ
w "1*ͷϢʔβʔϑϩϯτΤϯυ͔ͩΒɺϑϩϯτΤϯυͷϝϯλϧϞσϧ ͱ%4-ʢ"1*ͷ63- ύϥϝʔλ ϨεϙϯεʣΛ߹ΘͤΑ͏
O (&5BQJDBUFHPSZ@XJUI@BSUJDMFT@DPVOU 0, < \lOBNFzz1)1z zBSUJDMFT@DPVOUz^ \lOBNFzz4ZNGPOZz zBSUJDMFT@DPVOUz^
>
༨ஊղܾυϝΠϯͱυϝΠϯͱϝϯλϧϞσϧ w ϑϩϯτΤϯυղܾυϝΠϯɺόοΫΤϯυղܾυϝΠϯɺۀυ ϝΠϯ w υϝΠϯۦಈઃܭͷରͱͳΔͷυϝΠϯ͚ͩͰͳ͍ w ࠷ऴϢʔβʔͷϝϯλϧϞσϧͱҰக͢Δ࣮Λ͍ͯͯ͠%#ਖ਼نԽͳΜͯ ͍ͭ·ͰܦͬͯͰ͖·ͤΜ w
ϢʔβʔͷϝϯλϧϞσϧʹҰகͤ͞Δ͖%4-
QIQ @Component({}) export class MyComponent extends OnInit {...} "1*
#*; 6*69
UIBOLZPV