Skip to content

zack-barakat/Current-Weather-App

Repository files navigation

Current-Weather-App

1 App Architecture

1.1 General App Architecture

The application uses Dagger2 to inject repositories (whom maintain data layer and business logic) into different components of the app (fragments, activities, views, services, test cases, presenters, etc...).

Important Note: All presenters and classes interacts with the repositories interfaces only and does not interact with data sources directly.

1.2 Data Layer:

Repository pattren has been implemented as data source of truth for the presenters it can be found under data.repositories package. Each repository will have remote data source and local data source to support offline mode. Dagger2 should maintain only one copy of each repository per app session (Singlton behaviour).

  • WeatherRepository: Responsible for all weather data such as (fetching current weather, presisting weather,and etc...).

1.3 UI componentes architecture

Model View Preseneter known as MVP is the the architecture pattern used to develop the Weather app test application UI. Model: It is responsible for handling the data part of the application. View: It is responsible for laying out the views with specific data on the screen. Presenter: It is a bridge that connects a Model and a View. It also acts as an instructor to the View. To read more about MVP Architecture you may refer to these links:

2 Language used

2.1 Kotlin

2.2 Java

3 Main Libraries used

  • Dagger2 - Dependency injection framework
  • Anko - Set of Kotlin extensions to make android development faster
  • RxJava and RxAndroid - Reactive programming, simplifies work with threading and concurrency in java and android.
  • Mockito and Robolectric - Unit test framework and mocking tools.

4 Unit Test

All presenters have equivalent test presenets to test mvp intercations and ensure logic is done properly

5 App UI flow and functionality

There are only one screen in the app, Current Weather screen where user can view current weather info for a particular city and allow users to select from predefined city and get its weather.

Current Weather Screen

To test the the whole flow you can download the apk using this link from bitrise:

https://app.bitrise.io/artifact/16693614/p/e0a2b991d691a4bc6c43bb1c0792a642

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published