2. Table of Contents
1 Why a new architecture?
2 RIBs at Uber
3 What we got from RIBs
4 What we’re struggling with
3. Why a new architecture?
3 different apps in 2 platforms
4. Why a new architecture?
Project started
2018.06
Driver α
2018.07 2018.08 2018.09 2018.10
Rider α Beta Public release
5. Factors to consider
No MVC (no MVVM or MVP, too)
- MVC stands for Massive View Controller
- Keeping components simple
Map-based application
- We’re making a map-based application
No time to create a framework from scratch
- Conductor, Scoop, RIBs, …
6. Factors to consider
No MVC (no MVVM or MVP, too)
- MVC stands for Massive View Controller
- Keeping components simple
Map-based application
- We’re making a map-based application
No time to create a framework from scratch
- Conductor, Scoop, RIBs, …
7. Factors to consider
No MVC (no MVVM or MVP, too)
- MVC stands for Massive View Controller
- Keeping components simple
Map-based application
- We’re making a map-based application
No time to create a framework from scratch
- Conductor, Scoop, RIBs, …
31. Scopes
// `authToken` is not null in MainScope
class AuthenticateNetworkRequest: NetworkRequest {
private var authToken: String
public func makeRequest() {
addAuthToken(authToken)
super.makeRequest()
}
}
36. Downwards communication
Downwards communication via Rx.
Places LocationStream on DI graph and
cause Rx emissions.
Main
Receives LocationStream from DI graph.
Subscribes to LocationStream.
Home
Receives LocationStream from DI graph.
Subscribes to LocationStream.
Request
37. Upwards communication
Upwards communication with a Listener interface.
Implements Home’s Listener interface.
Main
Declares listener interface.
Invoke listener.onRequest() to
notify parent when tap.
Home
42. Screen stack
can be used when you want to push
an entirely new “Screen”.
UINavigationController is used as a Screen stack.
But UINavigationController
doesn’t support a transparent view.
47. What routers can do?
contain simple and repetitive routing logic.
create an additional abstraction layer.
make it easier to test complex interactor logic.
act as just a Helper?
48. What routers can do?
Request
LocationEditor Confirm Refinement
Attached RIB should be tracked by
Interactor or Router?
53. Wrap-up
1 Multi-platform architecture
2 Router, Inteactor, Builder, Presenter, and View
3 Business logic determines the state tree
4 Scopes
5 Communication between RIBs
6 Boilerplate, Screen stack, DI,
Router, Animation, Lifecycle