3 ms·
Component-izing Backbone views is a fantastic idea, and something I'm doing pretty frequently with Planscope. Your average jQuery plugin has you modifying stat
by bdunn 14y ago
Component-izing Backbone views is a fantastic idea, and something I'm doing pretty frequently with Planscope.
Your average jQuery plugin has you modifying state via invoking the plugin again on a selector with like a string argument that represents a function - this always felt clunky to me.
However, by using Backbone views to wrap logic, componentInstance.hide() or whatever else is doable, and IMO a lot more elegant. Nice work!
- Nervetattoo 14y agoWe've started to see a lot of component-izing Backbone, and more will come for sure. I'm dabbling with some of the same in our codebase, and we were meant to release a grid component that I now fear has grown too big and hairy. Not so sure on the idea of breaking it up this far; Buttons and checkboxes are single html-elements, so if you follow this approach fully you get a lot of views for a complex app — that'll be a performance issue.