See the . inside that model name? That means unless someone does really dumb things with the dependency injector, the two models will always refer to the same thing. There is no magic here--this is basic JavaScript prototypal inheritance. You have this exact same "problem" (I use the term loosely) whenever you read JavaScript code.
His rant about the "magic" dependency injector is noted, well received, and being fixed. So it's a non-issue.
His point about the digest loop, is just plain stupid. How else would you build it? Because that's literally what every UI framework does currently--including the browser his site is being rendered on. If he has some magic means of changing that, then please, by all means, enlighten the rest of us. That being said, the "magic number" of 2000 was never a magic number, and it was a misinterpretation, and it's also just plain wrong. And it's not relevant to today's Angular, which includes one-time bindings. And more importantly, it won't be necessary in the future with Object.observe.
His points about the documentation describing things strangely has been an active focus of fixing. But he's missed the point, once again, on some of this: people redefine terms all the time. It's part of being a living language.
And for his final point, he's once again missed the fact that this is being fixed. I'll be the first to admit that the fix seems a little clunky (requiring support for something that doesn't exist and won't exist in ES6 at this point), but frankly doing token-based injection as a concept is much better than the existing argument-based (ultimately string-based) injection.
The UI element binds to a property through an interface, when the property gets set, it fires an event, by which the UI gets notified, it then reevaluates the property by its accessor to get the new value. This is the basic idea, implementation detail you can look at dependency object, dependency property and binding classes.
That's a "digest loop". And that's also not how it works. From Wikipedia:
Periodically, MIL walks the tree and executes the rendering instructions in each node, thus compositing each element on to a DirectX surface, which is then rendered on screen.
...
All WPF applications start with two threads: one for managing the UI and another background thread for handling rendering and repainting.
What you described is the render loop. What I said is about how ui elements get updated information from their logical representation. To achieve this, angularjs use digest loop, it has nothing to do with Dom rendering. Wpf uses event on the other hand.
-3
u/lord2800 Nov 05 '14
He's missed part of the point. Short of very bad design, this is always resolvable by reading the source code:
See the
.inside that model name? That means unless someone does really dumb things with the dependency injector, the two models will always refer to the same thing. There is no magic here--this is basic JavaScript prototypal inheritance. You have this exact same "problem" (I use the term loosely) whenever you read JavaScript code.His rant about the "magic" dependency injector is noted, well received, and being fixed. So it's a non-issue.
His point about the digest loop, is just plain stupid. How else would you build it? Because that's literally what every UI framework does currently--including the browser his site is being rendered on. If he has some magic means of changing that, then please, by all means, enlighten the rest of us. That being said, the "magic number" of 2000 was never a magic number, and it was a misinterpretation, and it's also just plain wrong. And it's not relevant to today's Angular, which includes one-time bindings. And more importantly, it won't be necessary in the future with
Object.observe.His points about the documentation describing things strangely has been an active focus of fixing. But he's missed the point, once again, on some of this: people redefine terms all the time. It's part of being a living language.
And for his final point, he's once again missed the fact that this is being fixed. I'll be the first to admit that the fix seems a little clunky (requiring support for something that doesn't exist and won't exist in ES6 at this point), but frankly doing token-based injection as a concept is much better than the existing argument-based (ultimately string-based) injection.