diff --git a/README.md b/README.md new file mode 100644 index 0000000..f2d0479 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# Daily News: + +- Build app using Google's best practices and recommended architecture for building robust, high-quality apps. + +![MVVM](img/mvvm.png) + +- It's a News App, which `fetches` news from a `REST API` and renders in a RecyclerView, not every time we are fetching from Internet instead we are `caching` it offline in the `Room Database`. + +- For refreshing the manually using SwipeRefresh functionality, it also refreshes news articles time to time in around 60 minutes. + +- Using WebView to open the detailed articles, rather than passing to other browser the intent. + +- Breaking News `pageSize=100`. + +- There also a `Search News` tab where we can search news using a keyword. For e.g. `topics, locations & sources` in a `PaginatedView` of pageSize=20 after user reached the last, then the another page is loaded. + +- We can `Bookmarks` any news article which will appear in Bookmarks tab, these bookmarks are synchronized between all the screens, because of we are following `Single Source of truth principle`. + +![Single Source of truth](img/single_source_truth.png) + +- App written in 100% kotlin. + +- Using `Retrofit` to load data from `REST API`. + +- `Caching` the data in `SQLite` Database using `Room persistance library`. + +- For Paging, using the `Paging 3` library. + +![Paging](img/paging.png) + +- For rendering images, `Glide` library. + +- For multi-threading and long running operation, using Kotlin `Coroutines` & Kotlin `Flow`. + +- For dependency injection using `Dagger Hilt`. + +- In simple example dependency injection looks like. + +

+ + +

+ +- To access view in compile-time safe ways, using `ViewBinding`. \ No newline at end of file diff --git a/img/di_1.png b/img/di_1.png new file mode 100644 index 0000000..b2f19bd Binary files /dev/null and b/img/di_1.png differ diff --git a/img/di_2.png b/img/di_2.png new file mode 100644 index 0000000..2d5a65c Binary files /dev/null and b/img/di_2.png differ diff --git a/img/mvvm.png b/img/mvvm.png new file mode 100644 index 0000000..ea61ca0 Binary files /dev/null and b/img/mvvm.png differ diff --git a/img/paging.png b/img/paging.png new file mode 100644 index 0000000..5287a5f Binary files /dev/null and b/img/paging.png differ diff --git a/img/single_source_truth.png b/img/single_source_truth.png new file mode 100644 index 0000000..d961049 Binary files /dev/null and b/img/single_source_truth.png differ