Reactive Programming

Reactive Programming is a style of Dataflow Programming where changes in input values are propagated through a function call graph. This should be familiar to users of spreadsheets. This is naturally expressed in Functional Programming, resulting in Functional Reactive Programming.


Related to Event Driven Programming, Event Driven Architecture, Complex Event Processing, Event Stream Processing. These aren't associated with 'changes to inputs', but rather to external discrete observations; however, the relationship is a close one.

Observer Pattern can be used to implement Reactive Programming, but requires explicit caching, far too much Self Discipline and knowledge to avoid problematic Side Effects that bite you in the arse later. Most programmers screw up. (Related: Deprecating The Observer Pattern)

Flow Based Programming may also be leveraged into Reactive Programming, but isn't ideally suitable for it.


A new Reactive Programming model is under development, called Reactive Demand Programming, supporting bi-directional communication of demands (making it more suitable for open modularity, constraint programming, distributed programming).


See original on c2.com