Skip to content
Arnaud Giuliani edited this page Mar 29, 2018 · 44 revisions

Android Architecture & Architecture Components

The Weather App

This repository contains the following projects:

  • weatherapp - A cool Android Weather App

Package structure

This project contains the following packages:

  • model- The weather model
  • view - the views of the app
  • repository - weather data repository components
  • data - contains the datasource of the app (remote web services, database ...)
  • util - util classes & extensions
  • di - Koin dependency injection definitions

Views

The app is composed of 3 views:

  • splash - the first screen of the app, that load last weather or default weather
  • weather - main screen of the app, displaying the weather of the day and next days for the given location
  • detail - display one weather data day, chosen from weather view

Tests

Yes, we have some tests :)

  • Unit tests in test folder, contains Presenter/ViewModel mock tests
  • Android instrumented in androidTest folder, will be used for Room part

The Workshop

Workshop exercises

Follow carefully each exercise and read each step. TODO sections will contain what you will have to do in each part.

Prepare your environment

The project contains all the Gradle dependencies need for all exercises.

Checkout the first step and synchronize your project to download all needed dependencies.

Git steps & tags

the project contains the following Git tags:

  • START (also master branch) - Start for part 1
  • PART_2 - End of part 1 and Start for part 2
  • END - End of part 2

Start your project from master branch. And make a new branch for your work. Each exercise has its own git commit.


Part 1: From MVP to MVVM with Architecture Components

Migrate our MVP architectured app to MVVM with Android Architecture Components

Steps

Part 2: Add database persistence with Room

Make the weather app fully persistent using the Android Architecture Room API

Steps

Clone this wiki locally