The main purpose of this app is retrieving Weather Report from https://api.darksky.net/ using Retrofit for doing HTTP request & GSON lib for parsing.
def retrofit_version = "2.6.2";
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
- Model: This handles the data part of our application
- Presenter: It acts as a bridge that connects a Model and a View.
- View: This is responsible for laying out views with the relevant data as instructed by the Presenter
- Activity, Fragment and a CustomView act as the View part of the application.
- The Presenter is responsible for listening to user interactions (on the View) and model updates (database, APIs) as well as updating the Model and the View.
- Interfaces need to be defined and implemented to communicate between View-Presenter and Presenter-Model.
- The View and Model classes can’t have a reference of one another.