Summary

In this chapter, we explored Backbone's View class. You learned how to create DOM elements by instantiating a View as well as how to pass in existing elements to new Views. You also learned how to use Views to hook up event handlers on the View's el and how to remove/reattach these handlers to the undelegate and delegate methods. Finally, we considered how Backbone's (deliberately) empty implementation of the render method leaves us many different options for how to implement our own render method and what factors influence those choices.

In the next chapter, we'll take a look at Backbone's final class, the Router class. This class lets us simulate traditional web pages, only using Views instead of separate HTML files to generate those pages.

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

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