Coder Social home page Coder Social logo

Planning for RxJava 2.0 about rxjavafx HOT 12 CLOSED

reactivex avatar reactivex commented on May 15, 2024
Planning for RxJava 2.0

from rxjavafx.

Comments (12)

thomasnield avatar thomasnield commented on May 15, 2024 1

I think for RxJavaFX 2.0, I am going to have the factories valuesOf() and nullableValuesOf(), which will behave opposite to RxJavaFX 1.0's valuesOf() and nonNullValuesOf().

The valuesOf() in 2.0 will not emit null values and simply ignore them. nullableValuesOf() will yield an Observable<Optional<T>>. I imagine we want to avoid working with Optionals as much as possible, and in most cases we will not want nulls anyway.

I believe this will be the smoothest transition so folks do not suddenly find valuesOf() emitting Optionals when they refactor to 2.0. I'll leave RxJavaFX 1.0 alone with the current factories as I see no good reason to have them mirror 2.0's factories. I do not want to cause severe breaking changes where folks may be depending on valuesOf() to emit nulls anyway.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

Sorry, long day. I read this backwards. Flowable supports bakpressure. Observable does not. This therefore will require little change thankfully.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

2.x branch has been created. Some refactoring has been done although still a lot of work left to resolve compile errors.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

RxJava2 has been released so this probably needs to become priority at some point. Unfortunately right now I'm busy with several projects, and while I hate creating contingencies I can't personally prioritize this until RxJava-JDBC and RxJava-Extras gets ported to RxJava2. I will get to this likely once that happens, but if anybody wants to contribute porting this to RxJava2 I will not hesitate to accept help.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

For handling lack of nullable types in RxJava2, I may have to follow suit with what ReactFX does and have non-nullable versions of factories. The nullable factories will have to use an Optional packaged with the library.

from rxjavafx.

 avatar commented on May 15, 2024

Any hints how to convert the JavaFxScheduler class to 2.0? I tried to convert it myself but failed. It did not execute anything. I'm pretty new to JavaRx in general and would really appreciate any help. Also I currently only need this class to execute things on the main thread. As far as I can see this is the only blocker to use RxJava in combination with RxJavaFX without using the JavaFX specific bindings?

from rxjavafx.

akarnokd avatar akarnokd commented on May 15, 2024
io.reactivex.Scheduler swingWorker = 
    io.reactivex.schedulers.Schedulers.from(SwingUtilities::invokeLater);

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

@akarnokd you must mean Schedulers.from(Platform::runLater)

from rxjavafx.

akarnokd avatar akarnokd commented on May 15, 2024

I don't know JavaFX just wanted to show an example with Swing as a quick workaround. You may still want to implement a proper Scheduler as there is no need for the trampolining from does.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

Good point. I may migrate this to RxJava 2.0 sooner than planned (maybe this weekend) as an exercise as well as to get it out of the way.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

Started working on this. I'm going to simultaneously release RxJavaFX 1.0 alongside RxJavaFX 2.0. If anybody has any last minute requests for features they'd like to see, let me know. I'm also going to remove the CompositeObservable @beta annotation.

from rxjavafx.

thomasnield avatar thomasnield commented on May 15, 2024

RxJavaFX 2.0 is now done. I'm going to do a sweep one more time and then do a pre-release.

from rxjavafx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.