The Only Introduction to Reactive Programming You Need
FRP is programming with asynchronous data streams.
Join the DZone community and get the full member experience.Join For Free
So you're heard about Functional Reactive Programming (FRP) but you're not entirely sure what it is. Well, welcome to the club, it's only populated by everyone. It's notoriously difficult to explain what exactly FRP is, and how you go about implementing it. More than one person has tried taking it on, even just the definition--it's just very hard to hit general audiences with the language. Wikipedia tried (too dry), StackOverflow only talks about it at a niche level, and Microsoft's RX explanation is too embedded in their own jargon. And I definitely can't put a better spin on it than these three already have.
"FRP is programming with asynchronous data streams."
Maybe that seems a bit reductive to you but it's about as clear as it gets. Of course, that's not all he has to say on the subject. The whole blog post is a lengthy and detailed review not only of what is Reactive Programming, but why is it worth your time, about which he offers this on why you should adopt FRP:
The benefit is more evident in modern webapps and mobile apps that are highly interactive with a multitude of UI events related to data events. 10 years ago, interaction with web pages was basically about submitting a long form to the backend and performing simple rendering to the frontend. Apps have evolved to be more real-time: modifying a single form field can automatically trigger a save to the backend, "likes" to some content can be reflected in real time to other connected users, and so forth.
Apps nowadays have an abundancy of real-time events of every kind that enable a highly interactive experience to the user. We need tools for properly dealing with that, and Reactive Programming is an answer.
It's exhausting how thorough Staltz is, but it's very useful because of that. He goes as far as to respond (comprehensively and intelligently!) in the comments with even more useful material. He is an inspiration to us all.
Opinions expressed by DZone contributors are their own.