This Demo Consists of MVVM Architechture with Architectural Components like LiveData, ViewModel and libraries like EventBus, ButterKnife, Retrofit2.
The flows goes like this:
View (Activities) -> ViewModel -> Engine (layer for network call)
There are several packages in this project let's discuss one by one:
- "engine" Package and "rest" Package: This consists of files in rest layer meaning these are responsible for fetching the data.
- "eventbus" Package: This consists of EventBus interfaces to use which is pushing data from one layer to another.
- "events" Package: This consists of interfaces for eventBus to use.
- "factory" Package: These files use Factory Pattern to get the instances of Engine Layer so that ViewModel can use.
- "pojo" Package: These are different POJO's required for the network call and Reponse.
- "threading" Package: This consists of files used for creating threads and to keep main thread away from doing any operations.
- "viewmodel" Package: This consists of ViewModels of different activities.