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
53
すばやく実装するための戦略とテクニック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
DevTools extensions で 独自の DevTool を開発する | FlutterKaigi 2024
kokiyoshida
0
120
subpath importsで始めるモック生活
10tera
0
330
Djangoの開発環境で工夫したこと - pre-commit / DevContainer
hiroki_yod
1
230
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
970
イベント駆動で成長して委員会
happymana
1
340
Contemporary Test Cases
maaretp
0
140
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
190
Outline View in SwiftUI
1024jp
1
340
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.4k
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
350
Featured
See All Featured
Optimizing for Happiness
mojombo
376
70k
Ruby is Unlike a Banana
tanoku
97
11k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
17k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
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