Coding Dojo: Functional Reactive Programming with JavaScript


Details
If you've ever written a large-scale JavaScript program, there's a good chance you are familiar with callback hell (http://elm-lang.org/learn/Escape-from-Callback-Hell.elm), encouraged by the absence of a standard event handling (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/EventLoop) abstraction. The community has been trying to solve these asynchronicity woes by making nested callbacks look like synchronous code with syntactic sugar (https://github.com/maxtaco/tamejs#tamejs), or by using the promise pattern (see: jQuery's Deferred (http://api.jquery.com/category/deferred-object/) and Promises/A+ (http://promises-aplus.github.io/promises-spec/) open spec).
In recent years, one more approach gained popularity, namely, functional reactive programming (http://elm-lang.org/learn/What-is-FRP.elm), as evidenced by rising interest in libraries like Bacon.js (http://baconjs.blogspot.fi/) and RxJS (http://reactive-extensions.github.io/RxJS/).
In this event, we're going to focus on the concept of FRP. By the end we will have implemented our own functional reactive event library. And, heck, some of you may actually understand monads (http://stackoverflow.com/questions/tagged/monads?sort=votes), although you won't feel like you did.
Pro-tips and considerations:
• This is a dojo event, so you won't need your laptop. To get an idea of what the Coding Dojo events are, check out these slides (http://www.slideshare.net/NetRateu/coding-dojo-applied).
• Knowing how to do JavaScript is essential.
• Understanding closures (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures) and functional collection processing (http://underscorejs.org/#collections) will help, but not strictly required. If anything, this might be your homework.

Coding Dojo: Functional Reactive Programming with JavaScript