ahampe / KDVS

Android app for streaming 90.3 FM in Davis, CA, live from anywhere
1 stars 0 forks source link

Create database module #30

Open ahampe opened 5 years ago

ahampe commented 5 years ago

This one is relatively low-hanging fruit because it's already in its own package under global. We should move the Room dependency to this new module and ideally only expose Repository classes publicly. I think we directly call Daos quite a bit, so there may be some additional work adding the repository abstraction layer.

ahampe commented 5 years ago

Reopening since this doesn't seem to be done yet

rpeg commented 5 years ago

Should I be following this pattern? https://medium.com/@marco_cattaneo/integrate-dagger-2-with-room-persistence-library-in-few-lines-abf48328eaeb

Here the repos are interfaces implemented by Datasources, which are injected with Daos. E.g. ShowDatasource implements ShowRepository and is injected with ShowDao + BroadcastDatasource. BroadcastDatasource implements BroadcastRepository and is injected with BroadcastDao, etc.