9. 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
36. 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
●
Two way data binding
●
Definitely a standalone framework
– modules, templating, dependency injection,
events, services, promises, testing, directives,
http, interceptors, history
45. Minification
●
Uglify for JS
– use .min.js when available
– also Closure Compiler, YUI compressor
●
clean-css for CSS
●
html-minifier for HTML
– danger zone
49. Caching
●
Explicit “Cache-Control: no-cache” for API
●
Cache everything else
– Far off Expires header
– Use Etags, include in URI
●
Application Cache?
●
Use s Content Distribution Network
52. Conclusion
●
Validate assumptions first
– Fail fast
●
Question your beliefs
– Black box abstractions are OK
●
Start with a clean slate, add when needed
– Reinvent the wheel if it's small
●
Optimize for development enjoyment
– It's a never ending journey