Skip to content

The Mighty Event: a cheat-code to `reduce` complexity and unlock super-powers

Photo of Tavis Rudd
Hosted By
Tavis R.
The Mighty Event: a cheat-code to `reduce` complexity and unlock super-powers

Details

The Mighty Event: a cheat-code to reduce complexity and unlock super-powers

Events are everywhere in programming and many systems are explicitly event-driven (http://en.wikipedia.org/wiki/Event-driven_programming) [1]. Event Sourcing (http://martinfowler.com/eaaDev/EventSourcing.html) is one technique that is becoming increasingly popular server-side [2] in OO languages. Under different names [3], it has been used for over 50 years in functional languages. This talk by Tavis Rudd (https://twitter.com/tavisrudd) and Roman Gonzalez (https://twitter.com/romanandreg) will explore its less obvious applications in browser-side UI development and testing.

UI development in the browser is hard, from interaction design to choosing an acronym - MVC, MVP, MVMP, MVVM, MVW, WTF. In several Coffeescript/Javascript examples we'll demonstrate techniques that reduce complexity (in both code & control-flow), simplify testing, and unlock secret super-powers [4].

Footnotes:

1: http://en.wikipedia.org/wiki/Staged_event-driven_architecture , http://en.wikipedia.org/wiki/Event-driven_architecture , http://martinfowler.com/bliki/CQRS.html , the Reactor Pattern http://en.wikipedia.org/wiki/Reactor_pattern for IO multiplexing (libev, twisted, netty, node.js, etc.)

2: see InfoQ: Event Sourced Architectures for High Availability - Martin Thompson (http://www.infoq.com/presentations/Event-Sourced-Architectures-for-High-Availability) or google for CQRS or Event Sourcing

3: reduce, `left fold`, inject, or, more specifically, state/ (https://strange-loop-2012-notes.readthedocs.org/en/latest/monday/functional-design-patterns.html#state-event)event reduction (https://strange-loop-2012-notes.readthedocs.org/en/latest/monday/functional-design-patterns.html#state-event). See http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 (http://en.wikipedia.org/wiki/Fold_(higher-order_function)) for an abstract, academic discussion and these notes from Stuart Sierra (https://strange-loop-2012-notes.readthedocs.org/en/latest/monday/functional-design-patterns.html#state-event) for the specific interpretation/application we are talking about. http://stackoverflow.com/questions/5331746/practical-use-of-fold-reduce-in-functional-languages and http://alan.dipert.org/post/307586762/polyglot-folding-ruby-clojure-scala?5db3a780 discuss other applications of reduce.

4: you've got to come to the talk to find out what they are!

Photo of PolyglotVancouver group
PolyglotVancouver
See more events
The HiVE
210 - 128 W Hastings St · Vancouver, BC