RxJava Beginner's Recommendation of RxJava

Hello, it is a thing of dip Advent Calendar 14 days of the person in charge. It is a big house.

In business, I am in charge of Android applications. But I also do iOS. I started studying Java language in spring and am making Android apps.

RxJava that I often hear in such daily work ...

I often hear the name, but what the heck is it?

This time, I investigated various things about RxJava from an amateur's point of view, so I would like to summarize it. Thank you! !!

What is RxJava ...

First of all, what is RxJava? about,

RxJava is a library for reactive programming in Java. In addition, this library has the advantage of being lightweight and easy to use because it has no dependencies on other libraries.

What is reactive programming?

Next is about reactive programming. Reactive pull gramming focuses on the flow of data. In the case of smartphone application development, a callback function is provided when creating or destroying the screen, but GPS is an easy-to-understand example of reactive programming. GPS will send data when its owner's location information is updated, and will stop sending data when it stops. In this way, reactive programming is the process that starts when data is generated, rather than executing logic for a specific event.

The advantage of implementing by reactive programming is that the data stream can be handled without difficulty because the processing can be coded separately for the data sender and the data receiver described earlier.

About Observable and Observer ...

I explained earlier that data transmission and reception can be described separately, but in reactive programming, the object that sends data is treated as an Observable, and the object that receives data is treated as an Observer. In addition, the Observer will be able to receive the data by subscribing to the Observable that sends the data.

Finally

In this article, I talked about RxJava and reactive programming. Next time, I will summarize the article with a simple demo, so thank you.

Recommended Posts

RxJava Beginner's Recommendation of RxJava
List of beginners (List) memo
[Java] Beginner's understanding of Servlet-②
[Java] Beginner's understanding of Servlet-①
[For beginners] Summary of java constructor
[Rails] Introduction of Rubocop by beginners
Summary of Docker understanding by beginners ② ~ docker-compose ~
The story of RxJava suffering from NoSuchElementException
Rails [For beginners] Implementation of comment function
Explanation of Ruby on rails for beginners ①