Join Kai Gittens for an in-depth discussion in this video Understanding views, part of Learning Backbone.js.
…We've come to the part in the course where we need to get our Backbone model and…collection data onto a webpage.…And in Backbone this gets done with views.…We've also arrived at the more difficult part of the course as well, so…I want to spend some time outlining how views work overall.…Views contain the rules for displaying our model data inside of an HTML structure.…What HTML elements should our data be placed inside of?…That gets defined in a view.…Does Backbone need to create these elements in advance, or…are these elements already on our web page?…That also gets defined in a view.…
What methods and…properties are needed to actually get the data inside of these web page elements?…Again, that gets defined in a view.…An important property to define inside a view is template.…And this is the first time we're interacting with Underscore in…this course.…Backbone gets its template functionality directly from Underscore.…Now, Backbone does allow for the use of other templating libraries like…Handlebars or Mustache, but for what we need to do, Underscore will be fine.…
- What is Backbone.js?
- Understanding how MVC libraries work
- Adding properties to a model
- Creating a collection of models
- Adding properties to a model view
- Loading model data on a web page
- Configuring routes
- Finding Backbone resources