[FoRK] AngularJS — Superheroic JavaScript MVW Framework

Bill Humphries whump at mac.com
Mon Oct 7 22:23:32 PDT 2013

On Oct 7, 2013, at 8:25 PM, rst at ai.mit.edu wrote:

> Angular is one of several client-side MVC frameworks that have buzz
> right at the moment (Ember is another; Backbone is more bare-bones,
> as befits the name).  Unfortunately, among these, it seems 
> distinguished by cryptic documentation and oddball naming conventions
> which do little to enlighten non-initiates.  People do impressive
> things with it, but the learning curve is awfully steep...

Angular, Knockout, and Ember feature two-way bindings (i.e. DOM changes propagate to model, and visa versa.)

I've used Knockout on a couple of projects, and the approach is to set the bindings between model and HTML using the data-attribute in your markup, and then have some setup code in your javascript to make the model aware of the bindings..

Backbone doesn't use declarative bindings, you set up event handlers on your models to re-render views in response to changes to the model, and event handlers on the DOM inside your view object to manage propagating 

I don't know if Ember, Angular, or newer versions of Knockout fix this problem, but when I was using Knockout in late 2011, it didn't have any adaptor code like Backbone's Model object (which proxies sync, save, and delete) to talk to backend APIs. 

With Backbone, I feel that dependency management's probably easier. Think of a view with an edit subview that doesn't get invoked by the user every time. I don't want to load the code or javascript templates for that subview until the user wants it. Using Require, this is pretty straightforward, but I'd have to dig into Ember and Angular further to see if I can load templates and modules on the fly. 

More here on the three declarative binding frameworks, if you're interested:


What was interesting was the tradeoffs these three frameworks make when dealing with large numbers of objects.

-- whump 

More information about the FoRK mailing list