Android_App

[RxJava] Intro to RxJava

brightlightkim 2022. 11. 5. 09:16

 

Asynchronous Function

  •  

Async Work

  • AsyncTask
  • Future (ListenableFuture)
  • Event bus
  • Observable

Evaluation

  • When they run
  • How they run
  • How they impact

AsyncTask

  • Must be explicitly stated
  • Work cannot be modified or composed
  • Data is output via side effects

Asynchronous Ideals

  • Explicit Execution
    • Create async tasks without needing to execute them immediately
  • Easy thread management
    • Easily assign code to the proper thread
    • Clearly understand which thread code is running on (readability)
  • Easily transformable
    • Async tasks are often interdependent
    • Direct chaining means less room for error
  • As few side effects as possible
    • Code is easy to trace, and easy to reason about

RxJava

 

 

 

 

 

 

 

 

from https://www.youtube.com/watch?v=XLH2v9deew0