Library summary that seems to be often used in recent Android development (2019/11)

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.

Other

Communication around

I often see configurations like ʻokhttp + retrofit + RxJava (RxKotlin) + RxAndroid + moshi (gson) `. Recently, I often see asynchronous processing using coroutines.

HTTP client

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.

JSON parser

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.

image

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.

Debug related

Log alternative

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.

Memory management

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.

Around the communication log

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?

Other

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.

Around the test

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.

Other

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.

Impressions

--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

Library summary that seems to be often used in recent Android development (2019/11)
Summary of ORM "uroboroSQL" that can be used in enterprise Java
[Android] I want to create a ViewPager that can be used for tutorials
[Github] Summary of commands often used during development
3 ways to import the library in Android Studio
CORBA seems to be removed in Java SE 11. .. ..
Summarize the life cycle of Java objects to be aware of in Android development
There seems to be no else-if in java
Site summary to be helpful in Minecraft modding 1.12.2
Personal summary of the guys often used in JUnit 4
Convenient shortcut keys that can be used in Eclipse
Android development link summary
A concise summary of Java 8 date / time APIs that are likely to be used frequently
The case that @Autowired could not be used in JUnit5
Firebase-Realtime Database on Android that can be used with copy
Introduction to Rakefile that can be done in about 10 minutes
How to implement one-line display of TextView in Android development
Java 14 new features that could be used to write code
Object-oriented design that can be used when you want to return a response in form format
Gem often used in Rails
Matcher often used in RSpec
I tried to summarize the words that I often see in docker-compose.yml
Summary of problems that I could not log in to firebase
Note that system properties including JAXBContext cannot be used in Java11
SwiftUI View that can be used in combination with other frameworks
It seems that data class-like functions will be added in Java14
Recent fixes to Java library FF4J that provides feature toggle functionality
How to override in a model unit test so that Faker can be used to generate random values