tochukwumunonye / PrintfulTechnicalTask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PrintfulTechnicalTask Android Build BCH compliance

PrintfulTechnicalTask is an Android application that uses an retrofit to fetch data from a web through an API and displays the data as a list. This application makes use of the Unsplash API.

IMG_20210421_151229 IMG_20210421_151052 IMG_20210421_151132 IMG_20210421_151152

Project Characteristics

This project makes use of the following tools and solutions:

Tech Stack

Minimum API level is set to 22, so the presented approach is suitable for over 92.3% of devices running Android as at the time of writing this.

Architecture

Clean Architecture is the "core architecture" of this application. The main purpose of this approach is to achieve a separation of concerns which Clean architecture helps with and in making the code loosely coupled. This approach results in a more testable and flexible code. This approach divides the project in 3 modules: presentation, data and domain.

  • Presentation: Layer with the Android Framework, the MVVM pattern and the DI module. Depends on domain to access the use cases and on DI, to inject dependencies. This is the layer closest to what the user sees on the screen.
    • MVVM: The Model View ViewModel pattern helps with the separation of concerns, dividing the user interface with the logic behind. It combines very well with Android Architecture Components like LiveData and DataBinding.
  • Domain: This is also known as viewModel. It is the core layer of the application with the business logic. It contains the use cases, in charge of calling the correct repository or data member.The domain layer is independent of any other layers.
  • Data: Layer with the responsibility of managing the application data and exposes these data sources as repositories to the domain layer. Typical responsibilities of this layer is to retrieve data from the internet and optionally cache this data locally.

Dependency Injection with DaggerHilt

Dependency injection is closely related to two SOLID concepts: dependency inversion, which states that high level modules should not depend on low level modules, both should depend on abstractions; and single responsibility principle, which states that every class or module is responsible for just a single piece of functionality. This application makes use of DaggerHilt as a DI library.

About


Languages

Language:Kotlin 100.0%