5 ms·
My take was that Angular and Knockout are really about databinding, while Backbone is more of a solid MVC pattern.
by netghost 16y ago
My take was that Angular and Knockout are really about databinding, while Backbone is more of a solid MVC pattern.
- catshirt 16y agoPerhaps, but consider that in terms of a client side application, databinding makes up a huge part of the first two layers. Leaving only the controller layer. The controller still in fact exists in AngularJS, but is moderated by Angular itself. Which is why there are configurations, parameters, rules, etc. This is where you start to sacrifice flexibility for automation. Edit: It seems Backbone uses a controller to literally describe how the app's routing works. I've never considered routes a controller's job given traditional MVC work (Cake, Lithium, etc). I was using "controller" to describe the event functionality that Backbone views provide (as a controller for how DOM objects behave when you interact with them). I don't think this alters my point much though.
- zachrose 16y agoIn my experience, it's turned out that the C in MVC isn't actually all that useful for client side web apps. Between routing, nested views, view methods for event handling, and fat models, there isn't much left to control. Active.js dropped the controller a few versions back.
- catshirt 16y agoYes... I'm with you but misspoke, tried to clarify in my edit. I was using "controller" as a term to describe "view methods for event handling". Clear conflict there since Backbone's "controller" is definitively something else.