Cotel / Android-Comonadic-UI

An experiment for bringing Comonadic UIs to Android
17 stars 1 forks source link

Refactoring app into basic MVP with a Store #5

Open Cotel opened 6 years ago

Cotel commented 6 years ago

In this branch we are trying to move away from the Android framework with a basic MVP approach #2 . We want to abstract the comonadic datatypes too so we can write them with plain Kotlin.

We will only call the View inside the render method of the Store which will be storing the Presenter state. This way we concentrate all the "effects" inside a method which could be potentially extracted (?). The downside is that operating with lists can be quite heavy as we need to calculate the diff and tell the view what to do. Luckily, Kotlin has good collection operators.

This is a work in progress so the next steps are:

tonilopezmr commented 6 years ago

I will review it before creating my PR to not be influenced by this.

Cotel commented 6 years ago

Seems legit. I'll try to not make big changes until then so we know how to move forward with this branch 👍 .