Skip to content

anandmali/Commits

Repository files navigation

Commits

Commits demonstrating best practices for android development, written in Kotlin

Tech-stack

Screens

RepoListFragment - Renders list of repositories. DetailsFragment - Render list of commits and a custom bar graph view representing number of commits made in each respective months.

Architecture

Modularized code providing benefits of better separation of concerns. Demonstrating recommended app architecture with structuring into separate modules, that can be grouped as activity/fragment, view models, repositories, data source, and dependecies.

Dependency injection using Dagger 2

AppComponent - application level dependencies component. AppModule - application level provider factory for Retrofit client, ApiServices, and View provider factory. ActivityBuilderModule and FragmentBuilderModule - subcomponent injector for activity and fragments. ViewModelKey - annotation type helping in multibinding for view provider factory.

Presentation layer

View (Activity / Fragment) - render data to the screen and passing user interaction data and having one-way interaction with view models. View models - dispatching state changes via LiveData and handling user interactions. Data binding - bind UI component in XML to data source, reducing boiler plate. Navigation - handling navigation.

Repository layer

Repository - independent of other layer handling data operations. Model - defining core structure of the data used within the application.

Data layer

ApiService - retrofit defines API endpoints interacting with the external repositories

About

Commits demonstrating best practices for Android development, written in Kotlin

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages