7. Toolkits vs. Frameworks
●
Toolkit: collection of libraries
some assembly required
●
Libraries should “do one thing and do it well”
●
Inversion of control
You call a library, but a framework calls you
14. AngularJS
●
What HTML would have been, had it been
designed for building web apps
●
80% of code deals with manipulating the DOM
AngularJS makes this go away
●
Definitely a standalone framework
modules, templating, dependency injection, events,
services, promises, testing, directives, http,
interceptors, history
17. Key Features
●
Declarative – not imperative
Two way data binding
●
Doesn't abstract away the DOM
Augments it with directives
●
More than one way to do the same thing
29. Dependency Injection
• inversion of control, removal of global state
– Important for testing
• function TodoCtrl($scope) {}
• app.controller('TodoCtrl',
['$scope', function() {}]);