3 ms·
I like the approach of separating the dom events logic into its own controller. In backbone the dom events are tied to the view which makes it more difficult t
by jsparks 16y ago
I like the approach of separating the dom events logic into its own controller.
In backbone the dom events are tied to the view which makes it more difficult to reuse the logic with other views. I've worked around this by doing pretty much the same thing as spine; i've created a dom controller from the base controller, but it's not ideal since the controller was specifically designed for hash change events.
- jashkenas 16y agoI think this just a terminology confusion. Spine Controllers == Backbone Views. Both have DOM events, a "this.el" property, a "this.$" selector, and event delegation. The patterns of use should be the same.