binary studio academy pro. js course. lecture 2. backbone
DESCRIPTION
Binary Studio Academy PROTRANSCRIPT
Backbone & underscore
Binary Academy 2014 Semenistyi Mykyta
Collections
Arrays Functions Objects
Utility
Collections● each● filter● map● reduce● reduceRight● some● every
● groupBy● indexBy● sortBy● ...
Arrays● indexOf● lastIndexOf● flatten
● first● last● compact● without● difference● ...
Functions● bind
● memoize● once● throttle● debounce● ...
Objects● keys
● values● isEmpty● isEqual● isNaN● ...
Utility● noConflict● times● random● escape/unescape● template● ...
Templates
Templates
Templates
Templates
Lo-dash
● Better performance
● More consistent API support
● Custom builds
● Heavily tested
● More features in place
Backbone
● encourages event-driven development
● implements unobtrusive REST
● aims to cover RIA implementation: Router,
Client-Server, Views
Objects and Inheritance
_.extend
Backbone.Model Backbone.Collection Backbone.View
Backbone.Events
Events
Events
Model
Model
Model
Model
Model
Model
Collection
Collection
Collection
Collection
View
View
View
chaining
View
existing el
unbinds listeners
Router
Router
Router
Router
https://github.com/tastejs/todomvc/tree/gh-pages/architecture-examples/backbone