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
80
今日から導入!!Routerパターン
第一回よちよち.swiftの登壇資料です。
Hiroki
November 27, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
『品質』という言葉が嫌いな理由
korimu
0
160
技術を根付かせる / How to make technology take root
kubode
1
240
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
1
170
チームリードになって変わったこと
isaka1022
0
190
Ruby on cygwin 2025-02
fd0
0
140
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.1k
Open source software: how to live long and go far
gaelvaroquaux
0
620
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
480
Honoをフロントエンドで使う 3つのやり方
yusukebe
4
2.1k
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
180
ARA Ansible for the teams
kksat
0
150
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
GitHub's CSS Performance
jonrohan
1030
460k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Site-Speed That Sticks
csswizardry
3
370
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送ってください!!