Re:Straightening our Backbone: A lesson in event-driven UI d...
by twsted on Thursday April 09, 2015 @04:57AM
(#9346404)
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.
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.