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
590
Multiplatform Engineering Roadmap for the Future
dekatotoro
1
130
継続的な開発スタイル 「AbemaTV iOSアプリを週一で リリースしている話」
dekatotoro
6
3.8k
iOS Adaptive UI - 解像度の異なるデバイスや画面の向きに対応する 最適なレイアウトへ -
dekatotoro
0
340
動画アプリをなめらかに動かす技術 - iOS -
dekatotoro
0
310
5分で学ぶ差分更新とRxDataSources
dekatotoro
0
260
AbemaTV モバイルアプリの開発体制と 開発プロセスの話
dekatotoro
0
240
Apple TV - tvOS入門 -
dekatotoro
0
110
AbemaTV on Apple TV
dekatotoro
0
36
Other Decks in Technology
See All in Technology
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
620
日経電子版におけるリアルタイムレコメンドシステム開発の事例紹介/nikkei-realtime-recommender-system
yng87
1
500
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
170
グローバル展開を見据えたサービスにおける機械翻訳プラクティス / dp-ai-translating
cyberagentdevelopers
PRO
1
150
一休.comレストランにおけるRustの活用
kymmt90
3
580
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
740
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
180
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
740
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
570
10分でわかるfreeeのQA
freee
1
3.4k
新卒1年目が向き合う生成AI事業の開発を加速させる技術選定 / ai-web-launcher
cyberagentdevelopers
PRO
7
1.5k
Featured
See All Featured
Teambox: Starting and Learning
jrom
132
8.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.2k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Rails Girls Zürich Keynote
gr2m
93
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
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