iOS Architecture: Exploring RIBs

Uber mobile architecture in details

Stan Ostrovskiy
The Startup

--

What is RIBs?

Joining UBER was a new chapter in my iOS Engineering career, and it all began with the new architecture, which is called RIBs. The major idea behind this architecture is that the app should be driven by business logic, and not by the view. The best way to visualize it is a tree: each RIB is a node, and it can have none, one, or multiple child nodes.

RIBs tree / image from official RIBs repo

During the app lifecycle, RIBs can be attached and detached, create the child nodes, and interact with them.

RIBs stands for “Router Interactor Builder”.

  • router is responsible for navigation between the adjacent RIBS
  • interactor is the main component, that handles the RIB business logic. It reacts to user interactions, talks to a backend, and prepares data that will be displayed to the user.
  • builder is a constructor that builds together all the RIB pieces

There are also an optional view and presenter. The view itself doesn’t have any business logic, and it’s only responsible for rendering a UI and accept the user…

--

--