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
Introduction to RIBs
Search
Yuji Hato
March 06, 2019
Technology
5
1.3k
Introduction to RIBs
Introduction to RIBs
Yuji Hato
March 06, 2019
Tweet
Share
More Decks by Yuji Hato
See All by Yuji Hato
ABEMAモバイルアプリ開発のDevOps戦略
dekatotoro
1
600
Multiplatform Engineering Roadmap for the Future
dekatotoro
1
130
継続的な開発スタイル 「AbemaTV iOSアプリを週一で リリースしている話」
dekatotoro
6
3.8k
iOS Adaptive UI - 解像度の異なるデバイスや画面の向きに対応する 最適なレイアウトへ -
dekatotoro
0
350
動画アプリをなめらかに動かす技術 - iOS -
dekatotoro
0
320
5分で学ぶ差分更新とRxDataSources
dekatotoro
0
270
AbemaTV モバイルアプリの開発体制と 開発プロセスの話
dekatotoro
0
250
Apple TV - tvOS入門 -
dekatotoro
0
110
AbemaTV on Apple TV
dekatotoro
0
36
Other Decks in Technology
See All in Technology
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
220
Application Development WG Intro at AppDeveloperCon
salaboy
0
190
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.7k
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
10
1.2k
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
TypeScript、上達の瞬間
sadnessojisan
46
13k
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Building Applications with DynamoDB
mza
90
6.1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Become a Pro
speakerdeck
PRO
25
5k
RailsConf 2023
tenderlove
29
900
Thoughts on Productivity
jonyablonski
67
4.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Transcript
Introduction to RIBs CA.swift 2019/03/06 Yuji Hato
ށ ༐ೋ • Contributed services dekatotoro @dekatotoro yuji.hato
Agenda 1. What are RIBs 2. Parts of RIB 3.
Communication Between RIBs 4. RIBs Tooling 5. RIBs practice 6. Conclusion
1 What are RIBs
What are RIBs RIBs is Uber’s cross-platform architecture framework
What are RIBs • େنͳϞόΠϧΞϓϦέʔγϣϯ༻ʹઃܭ͞Ε͍ͯΔ • άϩʔόϧͳঢ়ଶΛ࠷খݶʹ͑Δ • ςετ༰қੑ •
ͱґଘ͕ؔ໌֬ • ΦʔϓϯɾΫϩʔζυͷݪଇ(OCP) • ϏδωεϩδοΫυϦϒϯͷtreeߏ • λΠϓηʔϑ ಛ
What are RIBs • RIBҎԼͷ಄จࣈ - Router - Interactor -
Builder • RIBsRIBͷू߹ମ ༝དྷ
What are RIBs ߏ • RIB tree - RIBsͰϏδωεϩδοΫͷ୯ҐͰ͚ͨ ʮRIBʯΛҰͭͷմͱͯ͠ѻ͏
- RIBΛtreeߏͰߏங͢Δ - UI֊ͱҰக͠ͳͯ͘Α͍ - RIBಉ࢜ʹࢠ͕ؔ͋Γɺґଘؔͦ͜ ʹ͚ͩଘࡏ͢Δ - ґଘ͕ؔͳ͍RIBӨڹ͠ͳ͍
2 Parts of RIB
Parts of RIB RIB Overall
Parts of RIB RIB Overall • Interactor • Router •
Builder • View(Controller) (optional) • Presenter (optional) • Component
Parts of RIB Interactor • ϏδωεϩδοΫ Streamͷߪಡɺঢ়ଶͷมߋΛߦ͍ɺ RIBView(Controller)ॲཧΛҕ ৡ͢Δ
Parts of RIB Router • ϧʔςΟϯά RIBsࢠؔΛ࣋ͬͨπϦʔߏʹ ͳ͓ͬͯΓɺRouterInteractorΛ ࢹͯ͠ࢠRIBͱͷଓ/அΛߦ͏
Parts of RIB Builder • RIBߏཁૉͷੜ - Router - Interactor
- View(Controller) (optional) - ࢠRIB (optional) • DI ֤ཁૉͷґଘੑͷղܾΛߦ͏
Parts of RIB View(Controller) • UIͷදࣔ - ViewͷੜϨΠΞτௐ - Interactor͔Βҕৡ͞ΕͨUIߋ৽
- Router͔Βҕৡ͞Εͨը໘ભҠ - RIBͷoptionalཁૉ
Parts of RIB Presenter • DataModelͷม - BusinessModel → ViewModel
ม - ViewModel → BusinessModel ม - มॲཧͷTestability - RIBͷoptionalཁૉͰলུ͞Εͨ ߹ɺมॲཧView(Controller)·ͨ Interactor͕୲͏
Parts of RIB Component • RIBͷґଘؔΛཧ - Builderͷิॿ - ࣗͷґଘੑΛॴ༗
- RIBΛߏங͢ΔͨΊʹඞཁͳ֎෦ґଘͷΞΫ ηε - ଞͷRIB͔ΒͷΞΫηε੍ޚ • DIྫ ࢠRIBʹґଘΛͨ͢ΊʹRIBͷComponent ΛࢠRIBͷBuilderʹೖ͢Δ
Parts of RIB Object references in RIB • Router -
Interactor - View(Controller) • Interactor - Presenter - View(Controller) - weak Router • View(Controller) - weak Interactor
3 Communication Between RIBs
Communication Between RIBs RIB tree downward A RIB B RIB
C RIB • ࢠRIBͷBuilder.build()ʹύϥϝʔλͰ͢ • ComponentΛ༻͍ͨDIͰRx StreamsΛ͢
Communication Between RIBs RIB tree upwards A RIB B RIB
C RIB • RIBͷInteractorࢠRIBͷListenerΠϯλʔϑΣʔ εΛ࣮ • ࢠRIB͕ListenerΛհͯ͠RIBͷInteractorͷϏδω εϩδοΫΛ࣮ߦ • RIB͕ࢠRIBͷRx StreamsΛsubscribe͠ͳ͍ - ϝϞϦϦʔΫΛ͙ - ૄ݁߹ɺtestability
4 RIBs Tooling
RIBs Tooling RIBs Xcode Templates • RIBΫϥεͷੜ • RIBςετΫϥεͷੜ •
Component Extensionͷੜ
RIBs Tooling RIBΫϥεͷੜ • Builder • Interactor • Router •
View(Controller) (optional)
RIBs Tooling RIBςετΫϥεͷੜ • InteractorTests • RouterTests
RIBs Tooling Component Extensionͷੜ • ࢠRIBʹґଘͨ͠ComponentΛੜ RIB͔ΒࢠRIBʹඞཁͳґଘੑΛೖͨΊͷ Extension
5 RIBs practice
RIBs practice RIBs simple sample https://github.com/dekatotoro/RIBsSample RootRIB SearchRIB DetailRIB
5 Conclusion
Conclusion • UIKitʹґଘ͠ͳ͍ϥΠϑαΠΫϧ • ͱঢ়ଶͷείʔϓΛ໌֬ʹͰ͖Δ • ϏδωεϩδοΫυϦϒϯͷtreeߏͰυϝΠϯߏͷݟ͑Δ ԽͱӨڹൣғ͕Ѳͦ͢͠͏ • େنͰͳͯ͘ಋೖΛݕ౼ͯ͠ྑͦ͞͏
Thank you ࢀߟࢿྉ https://github.com/uber/RIBs/wiki https://www.slideshare.net/dhaval2025/ubers-new-mobile-architecture https://www.youtube.com/watch?v=FfwZSk6VRVY https://blog.japantaxi.co.jp/2018/12/09/1991