Closures are a powerful feature in Javascript. The ability to return a function from a function enable you to take advantage of all functional programming concepts in Javascript. ES5 introduced the concept of property descriptors, which include the ability to add getters and setters on a key in an object.
This talk will begin by introducing the middleware design pattern, how it is used in lots of node.js libraries like connect.js and union.js, and eventually will touch upon how such a pattern can be coupled with property accessors to modify a property at runtime.
There are several advantages to using this approach, which include:
1. Doing more work with less code due to the decoupled nature of middlewares.
2. Writing more testable code.
3. Achieving reactivity: the ability to know what changed immediately without needing dirty check each frame / cycle.
4. Creating objects that can be dirtied and cleaned, by using reactive dirty checking.
5. Adding an event listener to know when any key in an object changes, and using it to implement logging or debugging.
Finally the talk would go over some live examples of libraries that make use of this concept (like vue.js, Ember.js), and how a layman programmer can utilize this concept to make his application reactive, performant and easy to debug.