nedaluof/AnimeX
AnimeX ⛩️🌸 Simple app that demonstrates various Android development best practices
AnimeX
AnimeX ⛩️🌸 Simple app that demonstrates various Android development best practices
⛩️ Tech stack
- Kotlin
based, Coroutines- Flow
for asynchronous tasks.
- Flow
- Jetpack
- Android Architecture Components
- Lifecycle: Observe Android lifecycles and handle UI states based on the lifecycle changes.
- ViewModel: Manages UI-related data.
- DataBinding: support library that allows you to bind UI components in your layouts to data
sources in your app using a declarative format rather than programmatically. - Room: used to construct reliable caching for offline support.
- Paging 3
helps you load and display pages of data from a larger dataset from local storage or over
the
network. - Hilt: for DI (dependency injection) .
- Android Architecture Components
- Retrofit2 & OkHttp3: REST APIs.
- Moshi: A modern JSON library for Kotlin and Java.
- Coil: Loading images from network.
- Timber: A logger with a small API footprint.
- Material Components for Android
. - Architecture
- The app following MVVM Clean Architecture (View - ViewModel - Model) - Domain layer - Data
layer with Repository Pattern
- The app following MVVM Clean Architecture (View - ViewModel - Model) - Domain layer - Data
- This Repository contains 3 branches
-
First which represents master that contain
ready base code for development. -
Second which represents round one of
the development phase so
in this round the data bumped directly from the Remote Source to the UI over
the Paging 3
PagingSource without any caching , The next image demonstrates the flow of the process. -
Third which represents round two of
the development phase so
in this round the data bumped directly from the database to the UI over
the Paging 3
PagingSource Assisted
with Remote Mediator
which control the process of loading new pages from the Remote Source
and cache it on the database, so based on this flow the database become the source of truth of
the data in the app ,the remote mediator calculate the pages based on stored AnimeXPagingKeys
that contain:- nextKey -> next page number
- prevKey -> previous page number
- currentPage -> current page number
The next image demonstrates the flow of the process
-
License
Copyright 2023 Nedal Hasan ABDALLAH (NedaluOf)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the License.


