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 boilerplate code
  • Supports internal parsing using GSON, Jackson, Moshi, which can be configured
  • Supports caching
  • Annotation-based setting requests
  • Supports error handling
  • 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 an 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 avoids annotation processing which can often slow down build speeds. Coil depends on Kotlin's extension functions instead.

Kotlin-Dsl

  • Gradle is written in a groovy programming language, But we write the rest of the project in kotlin. using kotlin-DSL.
  • Using the kotlin-DSL, we can organize the dependencies in our project cleaner and in an efficient way.
  • Type safety. This 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 solutions from the android jetpack.
  • It allows to the storage of the data in the form of key and value pairs similar to shared preferences.
  • It is a replacement for shared preferences.
  • Shared preferences are synchronous and are not the main thread-safe but the data store is safe to use in the main thread since it uses dispatchers.io under the hood.
  • It is easy to migrate from shared preferences
  • Unlike the shared preferences which are 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 the android jetpack library.

Hilt

  • Reusability of code.
  • Ease of refactoring.
  • Ease of testing.
  • One of the important differences that make hilt to dagger is it's easier to use than dagger 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 easier to understand.
Clone this wiki locally