Because it is super easy. interface Contract { interface View { fun renderLoadingStateView() fun renderLoadedStateView(...) fun renderErrorStateView() } interface Presenter { fun requestLoad() } } class PresenterImpl : Contract.Presenter { override fun requestLoad() { modelLoader.load() .doOnSubscribe { view.renderLoadingStateView()} .subscribe({ model -> view.renderLoadedStateView(model) }, { e -> view.renderErrorStateView() }) } }
using React-Native, Flutter, Ionic, Xamarin? ◦ NO! ◦ They try to solve almost every task with the same code. ◦ However, some features, rendering, and IO operations are prone to unexpected exceptions. ◦ Most importantly, there is no code base and we have to work from scratch. • So, I’m going to use Kotlin Multi Platform. ◦ Easy to migrate (AOS already has) ◦ I love kotlin. ◦ => I will restrict the code base with the same idea as RIBs.
tree. Unlike with MV*/VIPER, a RIB does not have to have a view. This means that the app hierarchy is driven by the business logic, not the view tree. • Independent business logic and view trees. RIBs decouple how the business logic scopes are structured from view hierarchies. This allows the application to have a deep business logic tree, isolating business logic nodes, while maintaining a shallow view hierarchy making layouts, animations and transitions easy.