!SLIDE
Intro to Backbone.js
Aidan Feldman
github.com/afeld/intro_to_backbone
!SLIDE
moi
- Senõr Web Developer, Jux
- Instructor, General Assembly and NYU
- Sometime Backbone.js contributor
- Author, Developing a Backbone.js Edge (more on that later)
!SLIDE
What is Backbone?
!SLIDE
Why Backbone vs. jQuery?
!SLIDE incremental
Why Backbone vs. jQuery?
code organization
- useful abstractions
- Models & Collections
- perisistence over REST
- encourage modularity
- Views
- client-side routing
!SLIDE incremental
Structure of a Backbone app
(over-generalized)
- initialize base "class"
- think Java's
public static void main()
- usually a View
- think Java's
- load data (
<script>
or AJAX) into Models/Collections - initialize sub-Views
- bind to events on Models/Collections
- bind between Views
!SLIDE
Backbone Pieces
!SLIDE
Todos Walkthrough
!SLIDE incremental
Underscore.js?
What is- Backbone's only dependency, besides jQuery*
- the "Standard Library" JS never had
!SLIDE
Play time!
- tasks:
- "mark all as complete" (solution here)
- priority selector
- order/filter by priority
- docs: backbonejs.org and underscorejs.org
!SLIDE
Take-aways?
!SLIDE incremental
TodoMVC option]?
Why Backbone vs. [- easy to get set up
- easy to use pieces (both ways)
- easy to understand
!SLIDE incremental
Also
!SLIDE
y'all get a free copy of Developing a Backbone.js Edge
Leave comment here saying you attended:
BleedingEdgePress.com/contact-us
!SLIDE
Questions?
!SLIDE
Fin.
Aidan Feldman