RxJava
RxJava: fromCallable vs defer - The differences between the two operators
Autoplay
Up next
Previous
About
Description
This lesson describes the similarities and differences between the RxJava defer
and fromCallable
operators.
The operators are very similar and both can be used to solve the same type of problem: converting an expensive method call into an RxJava Observable.
This lesson describes the benefits of each and offers a recommendation on which you should use.
Summary of Content:
- What version of RxJava is required for each operator
- Advantages of using fromCallable over defer
- How fromCallable can result in writing less code
- Why fromCallable provides better error handling
- An example problem showing solutions using both fromCallable and defer
- How compact the code can become when using Retrolambda
Other Relevant Links:
Instructor
Links
Comments
Thanks for letting me know, Rodrigo. I'm not sure why that doesn't work (I swear it used to!) but this one should definitely work: https://github.com/CDRussell/CasterRxJava/tree/defer_vs_fromCallable
I'll update the link above. Thanks!
Lessons in RxJava
1. Introduction to RxJava for Android Developers
10:21
2. RxJava - Reading Marble Diagrams

06:13
3. RxJava Operators - SubscribeOn

03:19
4. RxJava Operators - observeOn

04:46
5. RxJava defer - Converting slow methods into an Observable

Pro
05:28
6. RxJava fromCallable - Converting slow methods into an Observable

04:48
7. RxJava: fromCallable vs defer - The differences between the two operators

Pro
03:00
8. RxJava Operators - Observable.just()

Pro
03:42
9. RxJava Error Handling with Observable.error()

Pro
02:38
10. Grokking RxJava’s Observable.amb Operator

Pro
03:15
11. Understanding the RxJava Observable.zip Operator

Pro
08:03
12. Retrofit 2 with RxJava

Pro
05:19
13. RxJava 2 – compose() operator

03:00
14. RxJava 2: a quick introduction
02:10
15. RxJava 2: Migrating Your First Stream from RxJava 1

Pro
03:52
16. RxJava 2 - Disposing of Subscriptions with Disposable

Pro
04:36
17. RxJava 2 - CompositeDisposable

Pro
01:31
Something went wrong
Lesson added to playlist
Create new playlist
Name can't be empty