Android-CleanArchitecture-Kotlin
Android-CleanArchitecture-Kotlin copied to clipboard
Reactive Programming
Any idea that how to use this architecture to be able to observe changes in database or firebase etc.
Could be modified or create a new use case class
Greetings
The usecase classes only do the equivalent of Single<Result<T>>
and therefore you'd need to ditch the usecase and rather observe something that lets you observe it.
The repositories can expose directly their Reactive functions to ViewModel.
It would be correct to use the functions that can be reactive as functions of RX-Java and the other functions as Coroutines.
Or is better to renounce to Rx-Java and use only Coroutines as Reactive Streams for instance Channels of Coroutines.
The other way isn´t using the coroutines of Kotlin and uses only the Rx-Java functions.
It would better use only one framework?
I think would better unify the data access for don´t break the pattern depending on the type of functions a people need.
Sorry but the English not is my native language
Thanks for your response
Why not to create separate use-case abstraction which will satisfy the reactive execution unit! For instance FlowUseCase<in T, out T>