farbodbj / GuardianNews

Simple online news feed app using Guardian Open platform based on clean architecture and best practices.
1 stars 0 forks source link

No Need for repository #19

Open keramat-farid opened 1 year ago

keramat-farid commented 1 year ago

Repository is for handing business logic and data. And must not depend on the frame work. For example you must be able to use the same repository for Android and Ios and Desktop. Theme is related to frame work so you don't need to add a repository for it. Therefore there is no need to inject it. I think its good thing to find a best practice for it in different libraries for example check android material sample applications.

https://github.com/farbodbj/GuardianNews/blob/1ff5d7e1cf82eaffe30e24b5a9e17030fdd5e615/app/src/main/java/com/bale_bootcamp/guardiannews/ui/MainActivity.kt#L37