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
610
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
120
AbemaTV on Apple TV
dekatotoro
0
38
Other Decks in Technology
See All in Technology
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1.1k
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
5分でわかるDuckDB
chanyou0311
10
3.2k
Wantedly での Datadog 活用事例
bgpat
1
530
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
17
4.8k
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
3
2.4k
NilAway による静的解析で「10 億ドル」を節約する #kyotogo / Kyoto Go 56th
ytaka23
3
380
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
270
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
400
C++26 エラー性動作
faithandbrave
2
780
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Navigating Team Friction
lara
183
15k
Optimising Largest Contentful Paint
csswizardry
33
3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
GraphQLとの向き合い方2022年版
quramy
44
13k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
We Have a Design System, Now What?
morganepeng
51
7.3k
Automating Front-end Workflow
addyosmani
1366
200k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Building Adaptive Systems
keathley
38
2.3k
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