Reactive programming

定義:

Reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm, it’s possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow. (from Wiki)

Note:

以一句話說明Reactive programming:
Reactive programming是一種宣告式程式設計範例,其功能是讓作為參數的data改變時,自動傳遞改變的data flow,使得最終結果值也跟著改變。
(p.s. 當參數的data改變,通知改變的方式有三種: 1. Pull 2. Push 3. Push-Pull。詳細說明請參考Wiki)

範例:

Wiki上解釋Reactive programming的範例
%d 位部落客按了讚: