Here’s my notes:
Even better: Notes on Hackpad
Key Value Observation (KVO)
This is the pattern that Ember.js implements. Idea is to bind data to elements in the DOM.
The problem is that we have to use units of computation that the platform gives you. This results in leaky abstractions. The developer
has to hold to much information in their head and solutions become complex to implement. Can’t compose using primitivies
Angular uses Dirty Checking.
NOT the simpliest way to build things.
- Whenever anything may have changed, re-render everything
- Diff the previous data previous with the next
- Only update the DOM with what changed
Avoid fighting the framework. Rerender and diffing feels expensive which is why we do data binding.
- KVO entangles app code with observables.
- Angualr style dirty chcking forces you to pass everything through $scope or $watch
- Virtual DOM needs a signal to say anything may have changed
- Memory is more important for performance on mobile than CPU usage.
- Render code is usually cheap.
- Your view is usually smaller than your model.
Simple composable primitives