NewsLand Android App Project aims to be a good sample for learners and reference for developers which provides:
- Get Latest News Headlines
- Read & Share news you like
- See news in multiple languages & countries
- Filter news to match your interrests using categories
- Rest API - Data Source: newsapi.org
- Fetched & Parsed data with Retrofit + Gson + Glide
- Blocking News with Room Persistence
- Infinity Scrolling (Lazy Load) RecyclerView
- MultiView (ViewHolder) RecyclerView Adapter
- Realtime Network Checker with BoradcastReciever
- Using & Handling WebView
- ViewBinding android views
- Implemented in Multiple Software Architectural Patterns
- Di with Dagger2 (MVVM + DI)
- Injecting ViewModels with Dagger 2 using Factory (MVVM + DI)
- LiveData (MVVM)
- RxJava (MVP)
- UI Components:
Chips, BottomSheet, RecyclerView, ListView, Swipe Refrech Layout, Snackbar - MVC (Skipped): No longer used as it's bad for android.
- MVP (Good):
- MVVM (Recommended):
-
Architectural Patterns provide a better readability, modularity, scalability and maintainability so it's necessary to be used in projects that can scale and that have a team of developers working on it.
-
Thats's only possible in personal or small projects.
-
Both are good for android development but MVVM is the best choice right now and recommended by google. Although MVP is good too but it can't handle android lifecycle like MVVM.
-
less code as it doesn't depend on interfaces, Android lifecycle aware, Easier unit testing with dependency injection.
-
Easier to learn, Doesn't depend on google libraries, More flexible to new features & maintenance, Reactive programming is optional.
-
Contract class is optional and you can use it in MVP but i prefer letting interfaces separated.
-
DataManager is an MVP extension layer which provides a clean API for accessing data from multiple sources and behaves like repository in MVVM.
-
It's there! but i prefer calling it view.
-
These classes are used to be able to make viewmodels constructor injection using dagger2 as normal apporach can't be applied due to Dagger2 & ViewModels conflict.
-
LivData is the best when it comes to UI & Android lifecycle integration like in ViewModels. RxJava is provides more options so it's better when working with Non-Ui tasks, threads and multi requests like chain REST API Requests.
-
Yes, as RxJava Provides stream conversion to LiveData.
-
They are RxJava observables that behave as LiveData Objects.
|
Newsland.Preview.2.mp4 |