Skip to content

Tools used in project

Devrath edited this page May 1, 2021 · 7 revisions

Project is developed using the libraries
Retrofit
Coil
Hilt
Kotlin-Dsl
Room
DataStore Preferences

Retrofit

  • Developer friendly library
  • Easy to Configure
  • Less boiler plate code
  • Supports internal parsing using GSON,Jakson,Moshi, can be configured
  • Supports caching
  • Annotation based setting requests
  • Supports error handeling
  • Easy to define retry and timeouts using the interceptor
  • Endpoint can be added in one place
  • Support to FLOW api of coroutines
  • Support to suspend function of coroutines
  • Very well documented and tested

Coil

  • Coil is a image loading library.
  • Coil is built to work efficiently with kotlin.
  • Coil loads images very faster with the number of optimizations which includes memory, disk caching, reusing of bitmaps, and down spacing the image in memory which makes it faster in comparison with other image loading libraries.
  • Library very lightweight and easy to use because it adds around two thousand methods, to your APK which are very less in number in comparison with Picasso, Glide, and universal image loader.
  • Library uses modern libraries of Android such as Okio, OkHttp, and AndroidX lifecycles.
  • Library aoids annotation processing which can often slow down build speeds. Coil depends on Kotlin's extension functions instead.

Kotlin-Dsl

  • Gradle is written in groovy programming language, But we write the rest of project in kotlin. using kotlin-dsl.
  • Using the kotlin-dsl, we can organize the dependencies in our project more clean and in a efficient way.
  • Type safety. Which allows better autocompletion which was missing from grovey till now.
  • Code navigation between files becomes easy in Kotlin DSL.
  • We can use all the functionalities of kotlin in our gradle file.
  • Refactoring is much easier.

DataStore Preferences

  • It is one of the data storage solution from android jetpack.
  • It allows to store the data in the form of key and value pairs similar to shared preferences.
  • It is a replacement to shared preferences.
  • Shared preferences are synchronous and are not main thread safe but the sata store is safe to use in main thread since it uses dispatchers.io under the hood.
  • It is easy to migrate from shared preferences
  • Unlike the shared preferences which is not safe from runtime exceptions, the data store is safe from runtime exceptions.

Room

  • Compile-time verification of queries.
  • Reduces boilerplate code.
  • Easy to understand and use.
  • Easy integration with RxJava, LiveData and Kotlin Coroutines.
  • It is a part of android jetpack library.

Hilt

  • Reusability of code.
  • Ease of refactoring.
  • Ease of testing.
  • One of the important difference that makes hilt to dagger is its easier to use than dageer even though it uses all the features of dagger under the hood.
  • Component part is not there to set-up compared to dagger which makes hilt uasier to understand.

Clone this wiki locally