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
今日から導入!!Routerパターン
Search
Hiroki
November 27, 2020
Programming
110
2
Share
今日から導入!!Routerパターン
第一回よちよち.swiftの登壇資料です。
Hiroki
November 27, 2020
Other Decks in Programming
See All in Programming
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
110
Making the RBS Parser Faster
soutaro
0
480
How Swift's Type System Guides AI Agents
koher
0
290
AIエージェントで業務改善してみた
taku271
0
540
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
440
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
240
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
150
10 Tips of AWS ~Gen AI on AWS~
licux
5
430
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
570
The Less-Told Story of Socket Timeouts
coe401_
3
580
AIと共に生きる技術選定 2026
sgash708
0
100
セグメントとターゲットを意識するプロポーザルの書き方 〜採択の鍵は、誰に刺すかを見極めるマーケティング戦略にある〜
m3m0r7
PRO
0
570
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
290
The agentic SEO stack - context over prompts
schlessera
0
760
30 Presentation Tips
portentint
PRO
1
280
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Typedesign – Prime Four
hannesfritz
42
3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
The browser strikes back
jonoalderson
0
980
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
Six Lessons from altMBA
skipperchong
29
4.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Curse of the Amulet
leimatthew05
1
11k
Transcript
今日から導入!! パターン
対象者 歴半年以上で、 ある程度開発に慣れてきた方 の知識があると
いきなりですが よちよちの皆さん
責務分割 意識していますか?
に 色々任せすぎて ないですか?
例えば こんなアプリ
の役割 ・画面レイアウト表示 ・画面の更新 ・次画面の生成・遷移 ・API通信 ・ユーザアクションの検知 ・データの更新処理 etc...
None
None
の役割 ・画面レイアウト表示 ・画面の更新 ・次画面の生成・遷移 / / VCから引き剥がす ・API通信 ・ユーザアクションの検知 ・データの更新処理
etc...
None
導入手順
❶ ベースとなるRouterプロトコルを定義
❷ HogeVCで使用する為の HogeRouterプロトコルを定義
❸ HogeRouterの具体的な実装
準備完了
活用方法
❶ ViewControllerに router変数を持たせる
❷ ViewControllerに inject関数を定義
❸ 画面生成時にRouterオブジェクトを 外部から注入する(DI)
❹ セルタップ時の画面生成・遷移を Routerを介して行う
の役割 ・画面レイアウト表示 ・画面の更新 ・次画面の生成・遷移 / / VCから引き剥がす ・API通信 ・ユーザアクションの検知 ・データの更新処理
etc...
の役割 ・画面レイアウト表示 ・画面の更新 ・API通信 ・ユーザアクションの検知 ・データの更新処理 etc… の役割 ・次画面の生成・遷移
スリム を 目指したいあなたへ
・MVP, MVVM, Clean Architectureなど 設計パターンを一通り学べる。 【利用者の声】 (東京在住の学生Hさん) 「書かれていることを実践するだけで ViewControllerがスリムになっていくのを 実感できました!!」
※個人の感想です。効果には個人差があります。
何か質問あれば Twitter(@ko__kko)に DM送ってください!!