3 ms·
Well written compendium of common design patterns. I love Backbone for its simplicity but I think most problems come from the use of the views' render function
by twsted 12y ago
Well written compendium of common design patterns.
I love Backbone for its simplicity but I think most problems come from the use of the views' render function, which encourages the habit to have a _centralized_ way to refresh theirs content.
This is, again, a simple way to think about the process, but often it is not the most performant (and this is what has driven to the clever virtual DOM diff-ing of the recent frameworks).
I normally use what I call 'micro-rendering' functions, a way to change the appearance of a view focusing on the change of single state properties.