4 ms·
Don't link to blog spam: http://www.angularjs.org/Main_Page http://www.angularjs.org/Main_Page Can anyone compare this with knockoutjs and backbone please?
by Charuru 16y ago
Don't link to blog spam:
http://www.angularjs.org/Main_Page http://www.angularjs.org/Main_Page
Can anyone compare this with knockoutjs and backbone please?
- catshirt 16y agoI can't speak towards either too directly (as I've only used each briefly), but in my experience the concepts of Backbone are a stronger conclusion derived from the same problem that likely sparked AngularJS. AngularJS essentially has you put a bit of logic into your HTML via parameterization. While I understand where the logic for this type of design seems useful (I've developed similar patterns on my own volition), the model driven pattern Backbone uses offers greater flexibility. For a basic reason, separation of view and data. I also find the nativity of Backbone appealing; Javascript and HTML as they were intended. On the other hand, in my experience the benefits of parameterization include very easy "out of the box" behavior, which seems to be the more likely (perhaps targeted) use case for AngularJS.
- netghost 16y agoMy 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.
- netghost 16y agoI actually asked a similar question over on reddit, http://www.reddit.com/r/javascript/comments/f1d6g/databinding_based_frameworks/ http://www.reddit.com/r/javascript/comments/f1d6g/databindin... . I'd love to hear more people's thoughts.
- aaronblohowiak 16y agoThis was asked on Quora yesterday: http://www.quora.com/JavaScript/How-do-Angular-js-and-Backbone-js-compare http://www.quora.com/JavaScript/How-do-Angular-js-and-Backbo...