.net - Reactive Extensions for Java -


Is Java (for .NET) equivalent?

About Rx (Reactive Extensions)

RX is a library that is designed to create asynchronous and event-based programs using collectibles.

I know about the Rule Engine, such as from Jebos, but there is some other way that is close to Microsoft. Net Attitude?

I do not know about one - and clearly in such a clean fashion It will be difficult. Threading side is fine; When it comes to threading, java is fully capable ... but at the moment, this language does not support appropriate features.

One of the clean design features of LINQ is that everything is based on the interface and then the extension methods are used to add additional methods. This allows the code to be read clearly - Imagine if you have to write:

  IObservable & lt; Int & gt; = Fair Select (observation where (source, x => x.SomeCondition) x => x.Some projection);  

The icon extension method is pretty much beautiful:

  IObservable & lt; Int & gt; = Source.Where (x => x.SomeCondition). Select (x = & gt; x.SomeProjection);  

Now a Java version can instead of an abstract based base class, but it will lose some elegance.

Next Come Lambda Quote and Method Group Conversion - These are basically fundamental to LINQ; The closest equivalent in Java (anonymous inner classes) is also very ugly to be used everywhere, which you use in Lambda expression in C #.

Actually, a Java version of RX would be possible, but it would not be as nearly as elegant as the C # version - which is probably not why it is, as far as I know it There may be other "asynchronized-driven" libraries, but they are unlikely to be as rx as widespread and clean.

It is possible possible that the change in Java 7 will make it more viable; As far as I know that the extension methods are not being introduced, but the abstract base class version will be appropriate if the lambda syntax is being corrected ...

< / Div>

Comments