Summary

In this chapter, we explored Backbone's Model class. You learned how to use get and set to change attributes, how to use on and off to listen for events, and how to use fetch, save, and destroy to exchange data with a remote server. You also learned how you can customize Backbone to handle your server's API by modifying the url, urlRoot, and idAttribute properties and how to handle differently structured data with parse and toJSON.

In the next chapter, we'll take a look at Backbone's other data class, Collection. Collections allow you to store groups of Models together, and (just like Models) they allow you to listen for changes and send or retrieve data to/from the server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.170.206