Vheissu / aurelia-for-real-world-web-applications-book-feedback

Post feedback as issues here on Github for the Aurelia book. Be as descriptive and honest as you like.
15 stars 0 forks source link

Clarify how binding system works, especially for those coming from Angular and dirty checking backgrounds #10

Closed Vheissu closed 8 years ago

Vheissu commented 8 years ago

A great suggestion again from @tosso who comes from an Angular background. Clearly explain how the binding system works and differences to a framework like Angular 1.x which used dirty checking extensively.

wshayes commented 8 years ago

As part of this, indicating specifically when objects are observed and not (e.g. shallow observation vs lack of deep object observation and suggest a design pattern to deal with this (e.g. trigger method to force a check - tmp = a; del a; a = tmp;). Also good to delve into array observation and patterns dealing with arrays for the edge cases where array changes are not observed.

Vheissu commented 8 years ago

This will be in chapter 6. I touched upon "dirty checking" and how to mitigate it using the @computedFrom decorator. In this same chapter there is a section called "Observation Strategies" in which strategies for observing arrays and objects are discussed as well as caveats for when changes are both observed and not observed.