How many lines do you need to implement this?

I thought VIPER was peak retarded until I saw RIB

  • Encourage Cross-Platform Collaboration
  • Minimize Global States and Decisions: Global state changes cause unpredictable behavior and can make it impossible for engineers to know the full impact of their changes. RIBs encourage encapsulating states within a deep hierarchy of well-isolated individual RIBs, thus avoiding global state issues.
  • Testability and Isolation
  • Tooling for Developer Productivity: Adopting non-trivial architectural patterns does not scale beyond small applications without robust tooling. RIBs come with IDE tooling around code generation, static analysis and runtime integrations — all of which improve developer productivity for large and small teams.
  • Open-Closed Principle: Whenever possible, developers should be able to add new features without modifying existing code. This can be seen in a few places when using RIBs. For example, you can attach or build a complex child RIB that requires dependencies from its parent with almost no changes to the parent RIB.
  • Structured around Business Logic: The app’s business logic structure should not need to strictly mirror the structure of the UI. For example, to facilitate animations and view performance, the view hierarchy may want to be shallower than the RIB hierarchy. Or, a single feature RIB may control the appearance of three views that appear at different places in the UI.
  • Explicit Contracts: Requirements should be declared with compile-time safe contracts. A class should not compile if its class dependencies and ordering dependencies are not satisfied.

Retarded, Incompetent, Boilerplate (RIB) as an architecture

Never go full retard

  1. Protocol extension
A RIB dev, circa 2020, colorized

A cascade of failures

  1. To patch massive view controller
When RIB didn’t prevent you from writing massive interactor

What do you mean, you people?

Related projects

If you like RIBs, check out other related open source projects from our team:

Needle: a compile-time safe Swift dependency injection framework.

Motif: An abstract on top of Dagger offering simpler APIs for nested scopes.

Swift Concurrency: a set of concurrency utility classes used by Uber, inspired by the equivalent java.util.concurrent package classes.

Swift Abstract Class: a light-weight library along with an executable that enables compile-time safe abstract class development for Swift projects.

Swift Common: common libraries used by this set of Swift open source projects.

I don’t know what kind of Android bullshit power play you’re trying to pull here, but Swift, (insert your wife’s boyfriend’s name), is my territory. So whatever you’re thinking, you’d better think again! Otherwise I’m gonna have to head down there and I will rain down an ungodly fucking firestorm upon you!




Casual iOS developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Let’s use Git(Version Control) to suit each occasion.😉 (part-1)

Learn HTML5/CSS3 from Scratch in 2022 (6.1)

AWS Certified Solutions Architect — EC2

Rolling out features for Zomato using Agile

Building microservices for Telegram bot using Node.js, RabbitMQ, MongoDB and Docker from scratch.

Advantages of PHP 7 Web Application Development — Aalpha

Color quantization using k-means

Docker, the Whale itself!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jim Lai

Jim Lai

Casual iOS developer

More from Medium

How to fail miserably with RxSwift + MVVM

apple/swift-evolution 上關於 guard 的有趣討論

Resolve a question about pthread_rwlock_t

RxSwift Combination Operators: zip, combineLatest & withLatestFrom