3 ms·
I don't mean to disparage backbone. It's simple in both design and implementation. I had my own KVO system I was using on a project when you announced backbone
by grayrest 15y ago
I don't mean to disparage backbone. It's simple in both design and implementation. I had my own KVO system I was using on a project when you announced backbone and I wrote a 10 line patch to add computed attrs and dropped my system for yours.
The problem I ran into was composition. It could have certainly been my failure in design but when I started trying to nest views inside other views I found myself unable to just do a innerHTML (i.e. dumb/idempotent) .render() call and instead wound up writing a significant amount of DOM manipulation code to get things working. It's been a few months and the details of exactly why this happened escape me but that's the general outline. The obsessive focus in SC on converting EVERYTHING to a model attribute change altered my thinking process for KVO so maybe I could now use backbone the same way.
My impression (since I still haven't done SC2 for more than toy projects) is that the more declarative nature of SC's approach yields cleaner composition. In theory, you should be able to do the same thing with both systems but in practice I found myself having trouble.