- Explain why we need templates on the front-end in addition to the server
- Identify the responsibilities of a "View" in Backbone, and how it differs from a traditional MVC view
- Describe the purpose of the "el" attribute in a Backbone view
- Explain the difference between views with an "el" reference versus a "tagName".
- Describe how Backbone views respond to DOM events
- Explain why it's important to call "remove" when taking a view out of the DOM.
- Use handlebars to create JS templates manipulated by a Backbone view
- Use the "render" function to manipulate the DOM to reflect the application's current state
- Create an item view that responds to DOM events and updates a model
- Create a collection view that generates and contains many item views
- Destroy an item view when the corresponding model has been destroyed
- Create a View with an "el" reference that attaches it to a document element.
- Create a View with a "tagName" reference that builds its own DOM element.
- Use handlebars iterators and conditionals to implement basic control flow in a template
- Review of Backbone models/collections
- Intro to views
- What are they in Backbone (views are attached to DOM elements)
- Why we use them
- How they fit into the context of MV*
- Why do we still need templates on the client if we have them on the server?
- Go over the Backbone docs for views, why we use them
- Go over model/collection events that we might want to listen to: http://backbonejs.org/#Events-catalog
- Discuss templating options
- Look over the Todo sample app for item views
- Describe the purpose of the "el" attribute in a Backbone view
- Explain the difference between views with an "el" reference versus a "tagName".
- Describe how Backbone views respond to DOM events
- YOU DO - Work on Grumblr item view on your own
- WE DO - Go over Grumblr item view together
- WE DO - Go over Grumblr form view together
- Look over Todo sample app for collection views
- YOU DO - Work on Grumblr collection view on your own
- WE DO - Go over Grumblr collection view together
OPTIONAL: Create Grumblr with jQuery soup so we can compare against Backbone code