Backbone.js
A JavaScript library that provides helpful types for building and organizing rich JavaScript interfaces.
Backbone.js defination :

Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.

Including Backbone.js in your webpage.



Defining a empty model in Backbone.js

Here Rectangle is new Backbone Model with no key value.We can specify any default key and value as per requirement.

Creating an new instance of model.

Here rectangleOne is object with property i.e Key,Value Map.In this case width,height etc are the keys and 100,50,’#FFF352′ are respective values.

Creating Views in Backbone.js


Rending View to a specific tag: