I started developing Android seriously last year, but it took me a while to get to know the libraries that are used to breathe in product development without anyone telling me. This article summarizes the most popular libraries for those who are just starting out with Android development.
"Commonly used" is completely subjective.
AAC
Abbreviation for Android Architecture Components, one of the components of Android Jetpack
https://developer.android.com/jetpack?hl=JA
Here are some of the most frequently used libraries included in AAC.
Data Binding Library
https://developer.android.com/topic/libraries/data-binding/?hl=JA
A library that is literally used for data binding. I often use it for MVVM development. It is very convenient because you can bind objects to XML and bidirectional data binding with LiveData, which will be described later.
Lifecycle
https://developer.android.com/topic/libraries/architecture/lifecycle?hl=JA
Manage the life cycle of Activities and Fragments. LifecycleObserver is very convenient because you can monitor the life cycle events of Activity and Fragment in other classes.
LiveData
https://developer.android.com/topic/libraries/architecture/livedata?hl=JA
LiveData can be linked to the life cycle to notify you of value changes. I replaced the part that used Rx Subject to notify between layers with LiveData. It is also useful for bidirectional data binding.
Room
https://developer.android.com/topic/libraries/architecture/room?hl=JA
Room provides an interface that allows you to use SQLite smoothly. I can't say anything because I haven't used it so hard.
ViewModel
https://developer.android.com/topic/libraries/architecture/viewmodel?hl=JA
ViewModel can manage UI related data in relation to the life cycle of Activity and Fragment. I think the context is a little different from the so-called MVVM ViewModel, but it is very useful for application development with MVVM. I use it a lot.
Navigation
https://developer.android.com/topic/libraries/architecture/navigation.html?hl=JA
You can manage the transition of Fragment with XML. By installing a plugin called safeArgs
, it is convenient because you can easily define the passing of data between Fragments.
Paging
https://developer.android.com/topic/libraries/architecture/paging/?hl=JA
You can easily (?) Implement the usual infinite scrolling paging.
I often see configurations like ʻokhttp + retrofit + RxJava (RxKotlin) + RxAndroid + moshi (gson) `. Recently, I often see asynchronous processing using coroutines.
okhttp
https://github.com/square/okhttp
It's the de facto standard. I can't live without this.
retrofit2
https://github.com/square/retrofit
A library that handles REST nicely. Often used with okhttp.
It seems that Jackson was used a long time ago?
gson
https://github.com/google/gson
Made by google. I often see it. I use Deserializer for complex requirements such as when I have to write it myself.
moshi
https://github.com/square/moshi
Made of square. Recently, I use this exclusively.
glide
https://github.com/bumptech/glide
It is indispensable for displaying images. I often see it.
picasso
https://github.com/square/picasso
I often see this one too. It seems that glide is used more physically.
Rx
RxJava
https://github.com/ReactiveX/RxJava
You can write code in the paradigm of reactive programming. The learning cost is high, but it is very convenient to remember. It's easy to think of it as a library for asynchronous processing. Recently, I feel the trend of replacing it with other technologies, but it is still used in various places, and personally it is quite painful without this.
RxKotlin
https://github.com/ReactiveX/RxKotlin
A Kotlin extension for RxJava. If you use Rx with Kotlin, let's introduce it.
RxAndroid
https://github.com/ReactiveX/RxAndroid
It is indispensable for asynchronous communication with RxJava in Android development.
RecyclerView
groupie
https://github.com/lisawray/groupie
It's too popular these days and I'm scared. But it's certainly convenient.
epoxy
https://github.com/airbnb/epoxy
Made by airbnb. You can easily build a complex RecyclerView. It is easy to use with Data Binding. Good compatibility with other airbnb libraries such as MvRx.
timber
https://github.com/JakeWharton/timber
A wrapper for android.util.Log. Nobody tells me, but everyone uses it (subjective). You can switch functions depending on the build type.
leakcanary
https://github.com/square/leakcanary
Made of reliable and proven square. Detects and notifies you of memory leaks in your app. I feel that it is used as a matter of course.
stetho
https://github.com/facebook/stetho
If you bite into okhttp, you can see communication logs etc. in Chrome. Very convenient.
flipper
https://github.com/facebook/flipper
Made by Facebook. It can also be used on platforms other than Android. I've never seen anyone using it. Is it good with stetho?
Hyperion-Android
https://github.com/willowtreeapps/Hyperion-Android
You can do various things. For details, see this article.
DI
Abbreviation for Dependency Injection. It's taken for granted these days. Reference
dagger2
https://github.com/google/dagger
Made by google from square. It is used insanely. I think the learning cost is quite high.
koin
https://github.com/InsertKoinIO/koin
DI library for kotlin implementation. The name recognition is rising and I feel the momentum. I like it because it's easier to understand than dagger.
mockito
https://github.com/mockito/mockito
A mocking framework. There is a feeling of de facto.
mockk
https://github.com/mockk/mockk
A mocking library for kotlin implementations. I've come to see it recently.
truth
https://github.com/google/truth
Assertion library made by Google. It seems that it is also adopted in the Android X test document.
ThreeTenABP
https://github.com/JakeWharton/ThreeTenABP
A library that makes it easy to handle dates on Android. Nobody tells me, but it's very convenient and many people use it.
--I strongly feel the flow of Java-> Kotlin (such as koin) ――In recent Android development, it is necessary to learn things with high learning costs such as dagger and Rx, and I think that the threshold to start development is high. ――Please let us know if you have a library like "Everyone is using this!"
Recommended Posts