Mobile App that that enables users to manager product listing (in and e-commerce environment) IProcure Ltd Android Engineer role interview solution
- Kotlin – a cross-platform, statically typed, general-purpose programming language with type inference.
- Coroutines – lightweight threads to perfom asynchronous tasks.
- Flow – a type of stream of data that emit multiple values sequentially.
- StateFlow – Flow APIs that enables flows to optimmaly emit state updated and emit values to multiple consumers.
- Koin – a pragmatic lightweight dependency injection framework.
- MVVM – Model View View Model
Unit tests that the data layer
Unit tests testing presentation layer
A well planned architecture is extremely important for an app to scale and all architectures have one common goal- to manage complexity of your app. This isn’t something to be worried about in smaller apps however it may prove very useful when working on apps with longer development lifecycle and a bigger team.
Read more about clean architecture here The app uses clean architecture with the following modules
This is the core layer of the application. The domain layer is independent of any other layers thus ] domain models and business logic can be independent from other layers.This means that changes in other layers will have no effect on domain layer eg. screen UI (presentation layer) or changing database (data layer) will not result in any code change withing domain layer. Components of domain layer
Models: Defines the core structure of the data that will be used within the application.
Repositories: Interfaces used by the use cases. Implemented in the data layer.
The data layer is responsibile for selecting the proper data source for the domain layer (In this case it contains only local source). It contains the implementations of the repositories declared in the domain layer.
Repositories: Responsible for exposing data to the domain layer.
Mappers: They perform data transformation between domain, dto and entity models.
Sources: Responsible for deciding which data source (network or cache) will be used when fetching data.
The presentation layer contains components involved in rendering information to the user. The main part of this layer are the views(Fragment, Activities Composables) and viewModels.