[Enhancement] Make Observables [IObservable<T>] a first-class-citizen in Maui #200
Replies: 9 comments 26 replies
-
There is already ReactiveUi (License MIT) who intend to do that. If it's improvement that could be bring to help them i would agree. |
Beta Was this translation helpful? Give feedback.
-
I like the idea of greater support for |
Beta Was this translation helpful? Give feedback.
-
Explain yourself
What do you intend to solve/Improve ? Please help us understand you're need ? The fact that ReactiveUI is a third party is not an problem at all.
Has i said :
Currently you exposed no problem of ReactiveUI. Expose them and we can have a real discussion. |
Beta Was this translation helpful? Give feedback.
-
ReactiveUI is not a problem, in fact it's fantastic, however the purpose of this request is to make reactive programming a first-class citizen within System.Maui since System.Reactive has everything we need to make observable pipelines within Maui. If we have to use RX UI, then we have to add a lot of additional boilerplate code in order to convert events into observables. Think All of the non-microsoft cross-platform frameworks are using some form of reactive programming as a first-class citizen within their framework. Managing events in c sharp is a pain, and observables make that pain almost entirely disappear. |
Beta Was this translation helpful? Give feedback.
-
I would certainly support a request to ensure that events work in the context of reactive-style application programming model (e.g. I placed a 👎 vote on the proposal not because I think reactive is bad, but rather because the proposal explicitly moves in a direction that hurts developers not already using these approaches (i.e. it is a proposal for a change to help one group of users at the expense of another). |
Beta Was this translation helpful? Give feedback.
-
If you said to change event handlers to |
Beta Was this translation helpful? Give feedback.
-
@ChaseFlorell It may soon be possible to use source generators to automatically generate |
Beta Was this translation helpful? Give feedback.
-
I really like the idea of using Source Generators, that would reduce the maintenance burden and add support for IOBservable |
Beta Was this translation helpful? Give feedback.
-
I have refrained from commenting on this, as I know the stigma of a functional programmer is not something the .NET Eco System likes. It's been brought to my attention that I am just a "Functional Nut Job" who wants to cause problems for people by showing them a different way to approach application development. Facts
Truth
What I want to see from MAUI are fewer Framework driven commands and more extensible events. Unfortunately, a lot of the newer Xamarin controls are taking the commanding approach, and making event-driven design a thing of yesteryear. To say something is 10 years old and state that as a reason why we shouldn't use it seems a bit out of turn. By that reasoning we should just abandon .NET all together for something newer because newer is better?! I think this thread points out the exact reason why System.Reactive hasn't gotten much love in 10 years. .NET devs immediately hate any suggestion towards making a change to the way they write code. If Microsoft doesn't explicitly tell devs "This is the way" they will shy away from it, even though they don't have a history of the best recommendations. So the concept of making |
Beta Was this translation helpful? Give feedback.
-
Summary
in order to compete with other mobile frameworks that are already embracing reactive programming principles, I would love to see Maui move away from Events to IObservable. All of the plumbing required to do this is already in the System namespace and will not require any third party dependencies.
API Changes
events
IObservable<T>
Intended Use Case
Make .NET Maui more desirable to reactive programmers, and move away from traditional event subscriptions. This should help mitigate a large number of memory leaks that folks get into with their traditional event subscriptions, and also draw a new crowd of developers coming from platforms that have already adopted reactive programming.
NOTE:
This is not a discussion about RxUI, RactiveUI, Reactive.Marbles, etc.
This is purely around using
System.Reactive
and everything that already exists in theSystem
namespace.Beta Was this translation helpful? Give feedback.
All reactions