Source Entities … Data models View models Mapper Mapper Database Remote API View Domain Data Repository Repository Impl Repository Impl Presenter / ViewModel Use Case Use Case
data structures. You can use basic structs or simple Data Transfer objects if you like […] We don’t want to cheat and pass Entities or Database rows. ”
Data Source Impl … Data Source Impl Entities … Data models View models Mapper Mapper Database Remote API View Domain Data Repository Data Source Data Source Presenter / ViewModel
Entities … Data models View models Mapper Mapper Database Remote API View Domain Data Repository … Data Source Impl Data Source Impl Data Source Data Source Presenter / ViewModel
Data Source Impl Data Source Impl Entities … Data models View models Mapper Mapper Database Remote API View Domain Data Repository Data Source Data Source Presenter / ViewModel …
Interface Adapter Interface Presenter N x Feature business rules … Activity / Fragment Adapter Impl Adapter Impl Entities Data models Mapper Database Remote API Domain Storage Remote UI View Interface
Interface Adapter Interface Presenter N x Feature business rules … View Interface Activity / Fragment Adapter Impl Adapter Impl Entities Data models Mapper Database Remote API Domain Storage Remote UI
x Feature business rules … View Interface Activity / Fragment Adapter Impl Adapter Impl Entities Data models Mapper Database Remote API Domain Storage Remote UI
x Feature business rules … State View Interface Activity / Fragment Adapter Impl Adapter Impl Entities Data models Mapper Database Remote API Domain Storage Remote UI
{ is Error -> view.renderDetailsError(productDetailsState.message) is Loading -> view.renderLoading() is Loaded -> view.renderDetails(productDetailsState.data) } }
Entities Data models Mapper Database Remote API UI Domain Storage Repository Adapter Interface Adapter Interface Presenter N x Feature business rules … Remote State View Interface
Data models Mapper Database Remote API UI Domain Storage Repository Adapter Interface Adapter Interface N x Feature business rules … Remote State View Interface Entities Presenter
Database Remote API UI Domain Storage Repository Adapter Interface Adapter Interface N x Feature business rules … Remote State View Interface Activity / Fragment Entities Presenter
Database Remote API UI Domain Storage Repository Adapter Interface Adapter Interface N x Feature business rules … Remote State View Interface Activity / Fragment Presenter Entities
price: String, val image: String, val description: String, val distanceInMeters: Int ) Domain module UI module internal fun Product.getPriceInEuros() = "$price €"
Entities Data models Mapper Database Remote API UI Domain Storage Repository Adapter Interface Adapter Interface Presenter N x Feature business rules … Remote State View Interface