Blog

Backbone.js

Backbone.js  a popular open source JavaScript framework that allows us to develop single page web application. It offers a MVC framework for organizing Javascript application.

About Backbone.js::-
– Backbone.js is a client-side MVC architecture. It is a design pattern where we separate the data from the way it is defined, manipulated and displayed. It allows you to structure your Javascript code in an MVC pattern.
– In the MVC platform, web application depends upon server for getting json data for the logic on how to display it. Here load on server is reduced and it helps in increasing the speed of the website.

-It’s easy to create small and slick web applications with frameworks like jQuery. When a project grows, however, the jQuery declarations and callbacks get more and more complex and are distributed all over the place. The code becomes more and more cluttered and hard to read.

-It provides an event-driven communication between views and models . One can attach event listeners to any attribute of a model, which gives you very nuanced control over what you change in the view.

-The BACKBONE.JS events build on top of regular DOM events, which makes the mechanism very versatile and extensible. With one line of code, for example, one can introduce a publish/subscribe pattern to backbone that ties all of your views together

-The models in Backbone.js   can be easily tied to a back-end. Out-of-the box the framework provides excellent support for Restful APIs in that models can map to a RESTful endpoint. If the API is designed correctly, backbone is already configured to access these directly for read, write, and delete operations.

-If a backend other than a RESTful API is used, backbone.js is still flexible enough to accommodate for that.

-Conventions are a great way to introduce a common coding style without the need of coming up with an extensive set of coding standards.  Backbone.js is particularly helpful to maintain a clean code base despite having multiple people collaborating on the code.

Share This :

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.