Droidcon SF - Common RxJava Mistakes

Ғылым және технология

Droidcon SF 2016
Organized by: Apps4All (apps4all.io)
Content Curated By: touchlab (www.touchlab.co)
RxJava is a powerful framework, but there are a lot of common issues developers run into when getting started with it. We'll go over a bunch of common mistakes and and best practices when it comes to working with RxJava. This talk assumes a beginner's knowledge of RxJava.
Speaker:
Dan has been working on Android for over six years. He first started at Mobiata, went on to lead the Android team at Expedia, and is currently working at Trello. He's a Google Developer Expert for Android and has been giving talks on various Android topics for years. He's released a couple of open source Android libraries and several open source apps on Github (github.com/dlew). He also writes regularly about development (blog.danlew.net/).

Пікірлер: 22

  • @rizaldim_
    @rizaldim_8 жыл бұрын

    Timeline: 01:07 Lambda notation 02:21 The stream 03:54 Creating observables 101 04:53 Difficulties when using onCreate 08:37 RxRelay 08:58 Lessons 09:45 Operator misunderstandings 10:02 map vs flatMap 14:05 flatMap vs concatMap 15:18 toList() 16:58 List of lists 18:15 take(1) vs first() 19:20 cache() vs replay() 21:17 Operators I have written 22:07 Operators I should have written 22:15 Why not? 24:43 Threading 30:14 Lessons 30:46 Subscriptions 31:59 Memory leaks 32:50 Unsubscribe 33:05 CompositeSubscription 34:00 RxLifecycle 35:04 onError uses 37:06 Exception workarounds 38:13 Debugging onError 39:05 Implementing onError 39:48 Sharing 40:10 Hot vs cold 41:22 refCount 42:29 Lessons

  • @johnnyfirstshoe6326
    @johnnyfirstshoe63266 жыл бұрын

    Probably the best rxJava talk , up there with Jake's.

  • @witoldsienski1709
    @witoldsienski17096 жыл бұрын

    One of the best presentation with excellent examples :) Perfect timing!

  • @paramanathanilanthirayan7178
    @paramanathanilanthirayan71787 жыл бұрын

    Amazing talk with examples. Easy to understand

  • @huseyinbarin1653
    @huseyinbarin16537 жыл бұрын

    very clear talk.

  • @Oussamaabdallah
    @Oussamaabdallah6 жыл бұрын

    FlatMap and concatMap are very useful when i was writing my own library for downloading files i just used them to achieve an interesting behavior ( Parallel and sequential ) Downloading of a list of files.

  • @sankingshi6676
    @sankingshi66763 жыл бұрын

    very good

  • @stackming7709
    @stackming77098 жыл бұрын

    retrofit is always right

  • @whereispanama
    @whereispanama8 жыл бұрын

    I don't aggree about always favoring CompositeSubscription#clear over #unsubscribe. For example if you are using a CompositeSubscription and you create a new one it in onCreateView and call unsubscribe in onDestroyView it is very fail save because you won't accidentally resubscribe to it. Imagine you have some asynchronous callback coming in after onDestroyView. When you now subscribe to the composite subscription but have called .clear before your subscription will run, regardless of your intention to stop it. So often times it is better to call unsubscribe and create a new one if you enter onCreateView eventually again.

  • @AlbertVilaCalvo
    @AlbertVilaCalvo8 жыл бұрын

    Slides: speakerdeck.com/dlew/common-rxjava-mistakes

  • @ytSpoiler
    @ytSpoiler6 жыл бұрын

    Throwing exception in onError not rethrowing a exception outside subscriber it's important info

  • @arunsasidharannambiar
    @arunsasidharannambiar7 жыл бұрын

    Doesn't doing an if-error check violate the principle of command query separation?

  • @AlexanderBollbach
    @AlexanderBollbach5 жыл бұрын

    i'm confused about the slide at 3:00. in RxSwift (hopefully the concepts are the same), I can define an Observable from just and bind it to a variable and than map and subscribe to that.

  • @world-traveler880
    @world-traveler8808 жыл бұрын

    Anybody have a link to the referenced rxjava beginners talk that was at 3:30?

  • @4sky

    @4sky

    8 жыл бұрын

    +growingfuzzybeards I don't but Dan (the speaker) has a pretty good blog post for beginners blog.danlew.net/2014/09/15/grokking-rxjava-part-1/

  • @world-traveler880

    @world-traveler880

    8 жыл бұрын

    +Marco C. I already read that series or at least the first two. I would like to get an introduction in video form now.

  • @world-traveler880

    @world-traveler880

    8 жыл бұрын

    +growingfuzzybeards Ok I found the slides: speakerdeck.com/ferrytanu/simplify-your-code-with-rx

  • @GurpreetSinghgsk95
    @GurpreetSinghgsk957 жыл бұрын

    Should the create() method not be used in RxJava2 too?

  • @user-me1gu1kl4n

    @user-me1gu1kl4n

    6 жыл бұрын

    it should, cuz it was changed from scratch in rx2

  • @ManjunathC23
    @ManjunathC238 жыл бұрын

    How to handle 206's anyone ?

  • @HaiderKhanZ
    @HaiderKhanZ7 жыл бұрын

    Lambda notion looks cool but creates more methods for you when you compile (65K dex limit), c'mon man title is "Common RxJava Mistakes" and you already made a mistake at 01:07

  • @IbrahimEad

    @IbrahimEad

    7 жыл бұрын

    No, it's not a mistake retrolambda create for every anonymous class only one or three method which isn't that much to worry about the major reason you might exceed the 65K dex limit is libraries not your own code unless you have a really huge application which you will need to use multi dex anyway.

Келесі