Skip to content

App that shows list of countries and details of a country. Implemented with MVP architecture.

Notifications You must be signed in to change notification settings

gurappa/Countries-Info

Repository files navigation

                                Countries information application

What:
Android application that shows list of countries and details of a country chosen.

Why:
As modules of MVP are decoupled with dependency injection (Dagger 2),
-app allows injecting mock implementations when testing the logic (though no logic in this app but in future 😊 ).
-components are modular which can be reused
-Changing dependency implementations (say network module) without affecting the entire system.

Tech used:
Architecture: Model View Presenter.
Network Library: Retrofit
Image Library: Universal Image Loader
Async communication: Otto Event Bus
Dependency Injection: Dagger 2

Module level diagram that is not drawn so well but helps understanding the stuff better: alt txt

Improvements:

  1. I just realised there are flags available in SVG format as well. I would use them instead of separate 250 pixel and 1000 pixel PNGs to reduce the file sizes and also to reduce the no of network requests. As the flag images are not complex in terms of svg paths, rendering of SVG should not take extra time than that of PNG rendering.
  2. Two-pane layout for tablets. Fragments are modular and Activities/Fragmens combinations are well placed so should be easy.
  3. CoordinatorLayout for details screen.
  4. Adding image transition animation from countries screen to details screen.
  5. Launching maps app onClick Lat-long text field.
  6. Handle no-network scenarios.
  7. Currently app uses different retrofit service instances for each URL, one for Countries API, one for Details API. Should use only one instance by just changing the base url.

About

App that shows list of countries and details of a country. Implemented with MVP architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages