Reactive Programming Pattern

From GM-RKB
(Redirected from Reactive Programming)
Jump to navigation Jump to search

A Reactive Programming Pattern is a programming pattern for dataflow programming that applies asynchronous programming.



References

2016

  • (Wikipedia, 2016) ⇒ https://en.wikipedia.org/wiki/reactive_programming Retrieved:2016-10-13.
    • In computing, reactive programming is a programming paradigm oriented around data flows and the propagation of change. This means that it should be possible to express static or dynamic data flows with ease in the programming languages used, and that the underlying execution model will automatically propagate changes through the data flow.

      For example, in an imperative programming setting, [math]\displaystyle{ a := b + c }[/math] would mean that [math]\displaystyle{ a }[/math] is being assigned the result of [math]\displaystyle{ b + c }[/math] in the instant the expression is evaluated, and later, the values of [math]\displaystyle{ b }[/math] and [math]\displaystyle{ c }[/math] can be changed with no effect on the value of [math]\displaystyle{ a }[/math] . However, in reactive programming, the value of [math]\displaystyle{ a }[/math] would be automatically updated whenever the values of [math]\displaystyle{ b }[/math] and [math]\displaystyle{ c }[/math] change, without the program executing the sentence [math]\displaystyle{ a := b + c }[/math] again.

      Another example is a hardware description language such as Verilog. In this case, reactive programming allows changes to be modeled as they propagate through a circuit.

      Reactive programming has foremost been proposed as a way to simplify the creation of interactive user interfaces, animations in real time systems, but is essentially a general programming paradigm.

      For example, in a Model-view-controller architecture, reactive programming can allow changes in the underlying model to automatically be reflected in the view, and vice versa.[1]

  1. .