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
85
今日から導入!!Routerパターン
第一回よちよち.swiftの登壇資料です。
Hiroki
November 27, 2020
Tweet
Share
Other Decks in Programming
See All in Programming
Designing Your Organization's Test Pyramid ( #scrumniigata )
teyamagu
PRO
5
1.4k
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
120
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
120
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
600
Storybookの情報をMCPサーバー化する
shota_tech
2
1k
知識0からカンファレンスやってみたらこうなった!
syossan27
4
200
AIコーディングの理想と現実
tomohisa
37
39k
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
140
Road to Ruby for A Linguistics Nerd
hayat01sh1da
PRO
0
190
今話題のMCPサーバーをFastAPIでサッと作ってみた
yuukis
0
130
Cloudflare Workersで進めるリモートMCP活用
syumai
4
360
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
260
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Faster Mobile Websites
deanohume
307
31k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
34
2.2k
How to train your dragon (web standard)
notwaldorf
91
6k
Being A Developer After 40
akosma
91
590k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.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送ってください!!