Home » Backbone.js

Backbone.js

Welcome to Backbone.js tutorial, this tutorial will provide high level view of Backbone library to build client-side application. In this tutorial we will start with the basics of Backbone, how backbone models and collections can be used to develop and application, how views can be used to render the data using underscore templates, then moving further we will learn how backbone routing can be used to provide history support and backbone events can enhance the application. And at last we will learn about how backbone interact with server to get and post the data.

Below are the topics that I will cover in this tutorial:

 

What is Backbone?

Backbone is a lightweight JS library which can be used to organize the JavaScript code. Models and Views are two main concepts of backbone library. Views are used to display UI and Models hold the data as well as the logic to manipulate that data, that is why this library is sometimes referred as MV* pattern. Models itself act as controller in backbone as it holds application logic. Collection is another important concept of Backbone; it is basically a set of same type of models, you will learn how the same logic can be applied on set of models using backbone collection. 

You will learn more about each of these concepts in detail as you proceed with this course.

Prerequisite

To work with Backbone you should have a basic knowledge of JavaScript programming and Underscorejs.

Environment setup

To explain Backbone i will be using Underscore library which provides large range of utility functions and JQuery library to manipulate the HTML stuff throughout the course.

To start with Backbone just copy paste below lines in your html file.

<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script> // JQuery
<script type="text/javascript" src="js/underscore-min.js"></script>  // underscore library
<script type="text/javascript" src="js/backbone-min.js"></script>   // Backbone minified js

Comments are closed.