martindale/maki — pull request #25 by martindale (2014-10-14 09:52:13+00:00)
Title: WIP: Data Binding

This is a hand-rolled implementation of data binding, implemented as follows;

- Expect DOM elements to be `[data-model=ResourceName][data-path=/plural-or-singular-id-path]`
- Create in-memory "Model", and;
- attach `Object.observe` or `Array.observe` to trigger events on their changes.
- Subscribe to `/plural-or-singular-id-path` via WebSockets
- Receive JSON-RPC `patch` methods, that;
- provide data encoded in JSON-PATCH format
- Modify in-memory "Model" by applying the JSON-PATCH
- Re-render the appropriate template to the selected DOM location.

Frankly, this is an extremly naïve approach, but it's working. Definitely due for some benchmarks and comparisons against React and Angular 2.0.0.

Feedback welcome.