Open
Description
Hi all.
Alright in my project I followed an offline first architecture where I'm always Querying the local datastore. For each ressources that requires query, a Presenter
has two UseCase
objects:
- One that makes requests to the remote data store and save it locally, it never deliver information to presenter, the
rx.Subscriber
only does Logging. All saving operations are performed indoOnNext
. - Another one that is directly subscribed to the local dataStore and listen for insertion/deletion/updates via an Observable so that once something is changed it queries data and present it to the view.
final FetchArticleCollectionUseCase mFetchArticleCollectionUseCase;
final GetArticleUpdatesUseCase mGetArticleUpdatesUseCase;
It's working pretty well now. But I'm wondering if I'm still making a good use of UseCase
. And I personally find it cumbersome to write two UseCase
for one data output every time.