Functional reactive JavaScript on the client and the server
Functional reactive programming (FRP) brings the same unifying abstraction to both async network calls and event-based UI code. Pete Hodgson explains the core concepts of FRP and shows practical applications in JavaScript for both client-side UI development and server-side networking code. Say goodbye to manually managing state in your programs and start seeing the world as streams of values.
Talk Title | Functional reactive JavaScript on the client and the server |
Speakers | Pete Hodgson (Independent) |
Conference | Fluent |
Conf Tag | The Web Platform in Practice |
Location | San Francisco, California |
Date | March 8-10, 2016 |
URL | Talk Page |
Slides | Talk Slides |
Video | |
The reemergence of functional programming coincides nicely with the JavaScript renaissance. JavaScript’s large collection of features lends it to a functional style of programming. Pete Hodgson explains how to give JavaScript superpowers using a particular branch of the functional style—functional reactive programming (FRP). FRP provides a unifying abstraction that allows us to write programs without the distracting, accidental complexity of managing state, events, and asyncronous operations. With a single fundamental abstraction—the Observable—we gain a tool which provides the capabilities of promises, event streams, iterables, and more. We can use this unifying abstraction on both the client and server, allowing us to use a truly isomorphic programming style. Pete demonstrates how to represent streams of events in FRP using Observables and explores how to work with these streams to complete many different tasks. Participants will use this general-purpose tool to build some sample applications which range from reacting to DOM-based user interactions on the client to mashing up third-party APIs on the server.