Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Angular frameworks and dirty checking #4

Open
sllvn opened this issue Mar 5, 2015 · 1 comment
Open

Non-Angular frameworks and dirty checking #4

sllvn opened this issue Mar 5, 2015 · 1 comment

Comments

@sllvn
Copy link

sllvn commented Mar 5, 2015

Do other frameworks use dirty checking? Answer: yes (React,Ember,Polymer)

AFAIK, this is false or misleading at best. Ember uses accessors to provide model updates to its bindings. React uses the virtual DOM and a diffing algorithm to provide updates. I don't know enough about Polymer to make a claim.

Sources:
Ember: http://blog.bguiz.com/post/57373805814/accessors-vs-dirty-checking-in-javascript-frameworks/
React: https://news.ycombinator.com/item?id=6937668

@PatrickJS
Copy link
Owner

Thanks for submitting an issue. You're right about Ember they were planning on using Object.observe which would mean they would be using dirty checking I did the same mix up with di and added Polymer by accident. (Ember has been removed )

React uses dirty checking. They're just better at it compared to ng1 since they prune the tree and other ways to optimize (immutable data contract [knowing the data is immutable you can depend on it's references]) the tree before running their “diff-ing” (dirty) algorithm. Both frameworks took the idea from game development. Facebook is pretty good at marketing so another example being Flux(really just pub/sub architecture on the client)
http://simonjf.com/drafts/ifl2014.pdf
http://stackoverflow.com/questions/21109361/why-is-reacts-concept-of-virtual-dom-said-to-be-more-performant-than-dirty-mode

Polymer on the other hand uses dirty checking when you don't have Object.observe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants