-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RxSwing Vision #30
Comments
Would be interesting to "hear" something from the project leaders. I'd propose for keeping RxSwing what it is: "Just a bridge" from the Swing model events / properties to RxJava. |
@eddieburns55 Just wanted to check, it's been a while since I posted this issue, do you have any opinion on my questions? |
Hi @mikebaum. I've always liked the idea of keeping this library lightweight, in that it gives you the bare boilerplate to create reactive widgets. Or at least that's how I used it. But I think you both probably have a better understanding of what's useful. Truthfully, I haven't used Swing or even Java since starting my new job, so I don't feel like I have much to contribute right now. Would either of you @Petikoch or @mikebaum care to step in as maintainers? I'd love to see this library keep moving forward. |
@eddieburns55 Yeah, I also have the feeling that RxJava should be lightweight. Of my previous suggestions the only one in my mind that might be suitable for that library would be the creation of some kind of @eddieburns55 @Petikoch In regards to your suggestion about taking on the maintainer role. I'd have no problem with that. Not sure how it works, but I guess you'd could explain it to me. Is there only ever one maintainer, if not perhaps Peti and I could both take on that role. If not, and Peti feels really strongly about taking on the role then he can take it on. Anyway, let me know... Cheers, Mike |
Hi @eddieburns55 and @mikebaum, sorry for my late answer. I feel connected to the RxSwing project and would like to support it. My main customer has some rather large Swing UI's which I'll rewrite to "reactive" using RxSwing (and MVVM) in the near future. Therefor RxSwing is not just a pet project for me. The work for RxSwing will be in "my time", not in the "customer's time". "My time" budget is at the moment small and my response time is not as good as I'd like to have it. Therefor I'd prefer to just assist @mikebaum as kind of co- or assistant-maintainer and would be glad to do that. Best regards from Switzerland, |
Hello. There seems to be nothing stopping this project to target Java 8 (although I don't remember what additions were made to the Swing API relative to 6). From RxJava's perspective, you have two options:
The fact that RxJava 2.0 may target Java 6 anyway doesn't really affect this project, unless you want to use Here are a few notable changes in programming against 2.0:
As for the other topics, I'm a direct Swing user and when I need to dispatch some events, I never felt the need to put abstractions over it. |
Ok @mikebaum, you should have write access now. Please email me with any questions: eddieburns55[at]gmail. |
I'm almost 100% certain there have been no additions to the Swing API since Java 6.
As for now, I have no opinion on which of these two options would be best as I'm not familiar enough with the 2.x branch yet. What would your suggestion be? For my part, I'm mostly interested in using java 8. I imagine that we might want to wait a little while until the 2.x branch is stable and a release is available. Is the use of Java 8 bound to using the 2.x branch, or could we start using Java 8 and then switch to using the RxJava 2.x branch at a later time?
I've been using RxJava in a rather large Swing application for 9 months now. Originally I started off using just
Anyway, as I previously mentioned, I'm not sure that the RxSwing project is the right place for this object, since it could also be useful for someone writing an application using JavaFx or possibly SWT. Perhaps a new project should be created? I'd be interested to see if this is something that could potentially fall under the ReactiveX umbrella, but I'm not sure how to go about that, or who to talk to? |
@eddieburns55 @samuelgruetter @zsxwing @Petikoch
Continuing from the discussion started in #13 ...
So seeing as though the RxJava project is in the process of creating v. 2.0, which targets jdk 8, I was wondering if we should/could follow suit. If I understand correctly one of the major reasons why RxJava targeted jdk 6 was to support Android. (I know there probably other considerations) So seeing as though Swing is not even supported on Android, I see no practical reason why we can't, moving forward, target jdk 8.
Beyond the choice of target jdk, I was wondering what is the vision of this project. I say this because aside from converting Swing listeners into event sources, there is a need for quite a few other abstractions in order to be a fully usable toolkit for developing a "Reactive" swing application.
Looking at other toolkits, ReactiveUI, ReactiveCocoa, etc.. there are several interesting concepts, abstractions that they offer. I would propose that we start work on rounding out this library using the existing Reactive toolkits for inspiration. Here are some proposals for abstractions that we could consider.
ObservableProperty - a new type of Observable akin to
Single
that is specialized for UI. It could be based on aBehaviorSubject
and would offer a binding api.View - a wrapper around some
JComponent
that offers a set of view properties. These view properties could use the existing swing adapters plus some additional code to convert raw events into value streams. For example a TextView would offer anObservableProperty
of typeString
that would emit the current value of the text field. Using property binding these properties could be bound to those offered by theViewModel
.ViewModel - a new type that would essentially represent a collection of properties plus as much of the business logic as possible.
Component - the union of a
View
and it'sViewModel
. It would be here that you setup the binding between aView
and it'sViewModel
. It could offer a simple api:Command - an abstraction for handling actions/commands (either synchronously or asynchronously). The command would take care of execution on a separate thread and would offer an api to stream results, exceptions and execution state (idle, scheduled, running, successful, cancelled, failed, etc)
So, if anyone feels this is worth working on I'd love to hear about it. If this is not the place for this, then perhaps we could setup another project that we could all work on together.
Cheers,
Mike
The text was updated successfully, but these errors were encountered: