greater/deeper use of Rx & observables #6312
Replies: 1 comment 3 replies
-
Avalonia does work with observables in low level. Features like bindings and animations are driven by them internally, with some internal optimizations (like single subscription observables, where it's possible). As a framework user you can find some API and extensions that work with observables too. To bring an example, there are GetObservable (from a property) (and more in AvaloniaObjectExtensions), GetResourceObservable, creating binding from an observable.
Observables being as part of Avalonia core wasn't a problem for us or anybody else as far as I can tell. @grokys might remember more. ReactiveUI is another story. Just for case, reactive extensions (System.Reactive) is not the same as ReactiveUI. The later one is MVVM framework build on top of reactive extensions with its own sugars. And Avalonia does not use it internally, but provides integration package (Avalonia.ReactiveUI). So, it's completely optional for developers.
Yes, reactive extensions won't be removed from Avalonia. |
Beta Was this translation helpful? Give feedback.
-
context: I'm an experienced Angular developer, and now find myself starting a desktop application at a new job. the other devs here are learning WPF, so I've started doing the same, but found WPF very... verbose compared to web frameworks (the Blazor dev here shares that opinion). AvaloniaUI, however, appears to solve a lot of these problems; I've shared AvaloniaUI with the other devs, but I'm still in the process of learning it, and am not (yet) at a point where I feel confident saying "this is what we gotta' use".
suggestion: I'd love to see greater, low-level support for observables in AvaloniaUI. I think AvaloniaUI's addition of binding to observables in the view is incredible! https://docs.avaloniaui.net/docs/data-binding/binding-to-tasks-and-observables and I suspect a lot of WPF/XAML's change notification & dependency property boilerplate could be done away with if observables were used more-thoroughly.
philosophical question: how much is the inclusion of observables and ReactiveUI seen as a draw by experienced AvaloniaUI developers? (I've noticed some mixed feelings about the inclusion of Splat, for example #6157 ; I could imagine there being mixed feelings about ReactiveUI.) observables are a core part of Angular; is that a direction AvaloniaUI even wants to start heading down?
Beta Was this translation helpful? Give feedback.
All reactions