Join Kai Gittens for an in-depth discussion in this video Watching for model changes, part of Learning Backbone.js.
…Most backbone components have an internal method called Initialize and its purpose…is to execute code as soon as a new instance of a component has been created.…Now, Initialize is commonly used to watch for any changes applied to models but,…I don't really need that for the web app I'm creating.…Also if the model changes,…it's usually the result of some information being passed from a web form.…And that information needs to be saved somehow, using either a database or…something known as a wrestle-pattern.…
Those are several related technologies, so I won't be discussing them in this course.…Now I'm not going to use Initialize in my final project.…However, it's still a good idea to see how this watching for…model changes process works as it's one of the best ways to understand Initialize.…So in this video, we're going to use this function to watch and listen for…model changes.…Once we create a backbone model instance, we have access to all of…its attributes and can use them in our web app however we want to.…
- 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