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
2
93
今日から導入!!Routerパターン
第一回よちよち.swiftの登壇資料です。
Hiroki
November 27, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
550
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
600
アセットのコンパイルについて
ojun9
0
130
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.8k
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
200
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
500
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
rage against annotate_predecessor
junk0612
0
170
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Amazon RDS 向けに提供されている MCP Server と仕組みを調べてみた/jawsug-okayama-2025-aurora-mcp
takahashiikki
1
110
私の後悔をAWS DMSで解決した話
hiramax
4
210
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
It's Worth the Effort
3n
187
28k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
The Language of Interfaces
destraynor
161
25k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Git: the NoSQL Database
bkeepers
PRO
431
66k
The Invisible Side of Design
smashingmag
301
51k
How to train your dragon (web standard)
notwaldorf
96
6.2k
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送ってください!!