In this chapter, you'll learn both what Backbone is and why you will want to use it to create web applications. In particular, we'll examine the following topics:
Created in 2010 by Jeremy Ashkenas, Backbone is a part of an entirely new breed of JavaScript libraries. Depending on who you ask, this type of library can be referred to as a rich application framework, a single page library, a thick client library, or just a JavaScript framework. Whatever you choose to call them, Backbone and its related libraries, such as Angular, Ember, and CanJS, provide tools that can be used to build websites that are so powerful that they go beyond being mere sites and become full-fledged web applications.
Backbone is made up of the following five major tools:
Model
class, which allows you to store and manipulate any kind of data as well as exchange this data with and from your remote server using AJAXCollection
class, which allows you to perform the same data manipulation and transmission but on groups of Models insteadView
class, which can be used both to render the DOM elements that make up the page and to manage any user interactions that occur on themRouter
class, which enables you to create an entire site, with any number of virtual pages, using only a single HTML fileWhile conceptually very simple, together these components allow you to create websites with a level of sophistication and robustness previously unseen on the World Wide Web (WWW).
3.94.202.151