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
Modular API Client
Search
naoty
August 17, 2016
Programming
1
400
Modular API Client
Kyobashi.swift #2
naoty
August 17, 2016
Tweet
Share
More Decks by naoty
See All by naoty
Repository pattern in Swift
naoty
3
6.3k
Timepiece
naoty
0
3.5k
Contribution to Rails
naoty
0
4.3k
久々のRailsプロジェクトで導入した開発環境
naoty
2
1.1k
Report of DIYish programming activity
naoty
1
220
How to build gems for Rails
naoty
1
150
Qiita/Kobito vs ?
naoty
0
190
Other Decks in Programming
See All in Programming
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.3k
Scaling your build logic
antalmonori
1
100
2025.01.17_Sansan × DMM.swift
riofujimon
2
570
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
最近のVS Codeで気になるニュース 2025/01
74th
1
110
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
ドメインイベント増えすぎ問題
h0r15h0
2
570
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
170
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
26
6k
為你自己學 Python
eddie
0
520
Azure AI Foundryのご紹介
qt_luigi
1
210
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Building an army of robots
kneath
302
45k
Why Our Code Smells
bkeepers
PRO
335
57k
It's Worth the Effort
3n
183
28k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Into the Great Unknown - MozCon
thekraken
34
1.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
Transcript
Naoto Kaneko Modular API Client 2016/08/17 Kyobashi.swift #2
None
௨৴·ΘΓࡶ w ϦΫΤετͷૹड৴ɺ͓ΑͼΤϥʔϋϯυϦϯά w ϦΫΤετͷγϦΞϥΠζɺϨεϙϯεͷσγϦΞϥΠζ w ΞΫηετʔΫϯΛϔομʔʹ༩ɺظݶΕͷ߹ϦϑϨογϡτʔΫϯͰ࠶ ൃߦ w ωοτϫʔΫΠϯδέʔλͷΦϯʗΦϑ
w ೋॏૹ৴ͷࢭ w ϩΪϯά w ύϑΥʔϚϯεܭଌ w FUDʜ
Ͳ͜ʹ࣮͢Δ͔ w "1*$MJFOUTXJGU w 7JFX$POUSPMMFSTXJGU
Ͳ͜ʹ࣮͢Δ͔ w "1*$MJFOUTXJGU ˠաଟ w 7JFX$POUSPMMFSTXJGU ˠίʔυͷॏෳɺංେԽ
.PEVMBS"1*$MJFOU w ෳͷʮҰͭͷ͜ͱΛ͏·͘ΔʯΦϒδΣΫτ͔ Βߏ͞ΕΔ"1*ΫϥΠΞϯτ w ػೳΛՃ͍͢͠ w ςετ͍͢͠
Modular API Client Request Response
API Client Request Response
API Client Middleware 3 Middleware 2 Middleware 1 Request Response
API Client Middleware 3 Middleware 2 Middleware 1 Request Response
API Client Middleware 3 Middleware 2 Middleware 1 Request Response
Middleware 1 → 2 → 3 → API Client → 3 → 2 → 1
None
None
None
w ॳظԽ͕ͳॻ͖ํʹͳͬͯ͠·͏ w ඞཁͳϛυϧΣΞͷηοτ͍͍ͩͨಉ͡ w ϛυϧΣΞͷηοτʹΞΫηεͰ͖ͳ͍
None
w ϛυϧΣΞͷηοτΛελοΫͱͯ͠ѻ͏ w σϑΥϧτͰඞཁͳελοΫΛॳظԽͰ͖ΔΑ͏ʹ ͯ͠؆ܿԽ
·ͱΊ w ௨৴·ΘΓͷॲཧࡶ ˠ֤ॲཧΛϛυϧΣΞͱ࣮ͯ͢͠Δ͜ͱͰ"1* ΫϥΠΞϯτΛখ͘͞อͭ w খ͍͞ϛυϧΣΞ܈͔Β"1*ΫϥΠΞϯτΛߏங ͢Δͷ͕໘ ˠελοΫʹଋͶΔ͜ͱͰ؆୯͔ͭॊೈʹॳظԽͰ ͖ΔΑ͏ʹ͢Δ
ৄࡉͪ͜Β IUUQOBPUZIBUFOBCMPHDPNFOUSZ