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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hiroki
November 27, 2020
Programming
120
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
今日から導入!!Routerパターン
第一回よちよち.swiftの登壇資料です。
Hiroki
November 27, 2020
Other Decks in Programming
See All in Programming
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
130
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.4k
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
280
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
570
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
1B+ /day規模のログを管理する技術
broadleaf
0
100
New "Type" system on PicoRuby
pocke
1
990
Vite+ Unified Toolchain for the Web
naokihaba
0
330
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.2k
Performance Engineering for Everyone
elenatanasoiu
0
200
OSもどきOS
arkw
0
580
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
The Language of Interfaces
destraynor
162
27k
A Tale of Four Properties
chriscoyier
163
24k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
210
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Navigating Team Friction
lara
192
16k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
980
Git: the NoSQL Database
bkeepers
PRO
432
67k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
170
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送ってください!!