Reputation: 579
I am new to the world of reactive programming. I read that once a variable is declared and it points to a continuous changing value, it will automatically update it. So I wonder what is difference in the gui controls provided by asp.net, java etc. Once we enter a new value in the textbox, it will hold the value automatically. Is it reactive programming? Can anyone provide some good tutorials to understand the concept better?
Upvotes: 2
Views: 1364
Reputation: 565
With reactive programming, you can bind to the UI user control not only a value but the result of some computation over it. The last open to you many opportunities. See more info in the readme for my library ObservableComputations:
https://github.com/IgorBuchelnikov/ObservableComputations
Upvotes: 0
Reputation: 191
Think of Reactive Programming (also called Dataflow Programming) like a spreadsheet. Changing the value in one cell automatically updates all other cells referencing the first. It "reacts" to changing data.
Using your GUI example... Let's say that the user enters a new value in the textbox. Let us also say that you have two other controls that use that value to display it in two different ways. Once the use enters a new value, those other two controls automatically receive the new value.
Yes, this could also be done with events but there are additional benefits that dataflow provides...
Dataflow and Reactive Programming is also a very "wide" topic, covering various methods to accomplish what I outlined above... be prepared for many different viewpoints.
Matt Carkci
Upvotes: 3