• Register
100 points
4

Want to solve programming problems and get paid for it? If that sounds interesting to you then contact us.

1. Explain what is backbone.js ?

Backbone.js is a JavaScript client-side (front end) framework, which helps to organize your code and makes it easier to develop single page applications.  It allows you to structure JavaScript code in an MVC  (Model, View , Controller) fashion

  • Model: It is a part of your code that populates  and retrieves the data

  • View: It is the HTML representation of this model

  • Controller:  It enables you to save your javascript application via a hashbang URl

 2.What are the advantages of Backbone.js?

Advantages of Backbone.js:

  • You can develop a web application with Backbone.js by using JavaScript with the minimal set of data-structuring (models & collections) and user interface (views & URLs).

  • It is best for developing MVC like web applications, single page web applications or complex JavaScript web applications in an organized and structured manner without JavaScript code mixing with HTML.

  • It provides API with many functions.

  • It provides a key-value binding and custom events.

  • It facilitates you to abstract your data into models and your DOM application into views and binds the two together using events.

 

3. Explain what is Backbone.js collections ?

An ordered set of models are represented by Backbone.js collections. Any event in model will trigger an event in collection directly.  For example, you can bind “change” event to be notified in a case when any model in the collection has been modified.

4. Explain what is Backbone.js router is used for ?

Whenever an application want to change their URL fragment in order to provide bookmarkable and shareable URLs for an Ajax heavy application, backbone.js router is used.

5. In which language, Backbone.js is written?

The backbone.js is written in JavaScript. It is a JavaScript library that contains a RESTful JSON interface.

6.What are the main components of Backbone.js?

Main components of Backbone.js:

  • Model - It performs various types of action on the data like validation, conversion, computed properties, access control.

  • View - It specifies how your data looks like.

  • Collection - It handles the loading and saving of new models to the server.

  • Router - It is used for routing client-side applications and connecting them to actions and events.

  • Event class object - It facilitates the objects to bind and trigger the custom events by using the desired name of our choice.

7. Which are the three js files that are required to setup Backbone.js?

Following are the three js files that you require to setup Backbone.js:

  • jQuery

  • Backbone

  • Underscore

8. What is sync in Backbone.js?

Sync is a function that is called every time. It attempts to read or save a model to the server. It persists the state of the model to the server.

9. What are the keypoints of Backbone ?

  • It has hard dependency with underscore.js to make it more functional and supporting a range of useful collection based operations

  • With jQuery it has a soft dependency

  • When the model changes it can update the HTML of your application automatically

  • It uses client-side rendering framework or Javascript templating to render html which avoid you to embed HTML code inside JavaScript code

  • For UI updates and DOM manipulations if offers a significantly clean and elegant way

10. Explain what is view in Backbone.js?

Backbone view is a Javascript object that manages a specific DOM element and descendants.

  • Views are not HTML

  • It is a description of a model

  • The HTML code comes from templates

  • Works with any template system

11. Explain what is Backbone.js Models?

Backbone.js models are object and core of backbone.js. It contains an array of attributes and listens for events. To represent your data, Backbone provides a model object.  For example, you have a to do list, you would have a model representing each item on that list.

12. Explain what is Modelbinder in Backbone.js ?

To make synchronization process of views and models together, ModelBinder class is used.

SOURCES :
javatpoint.com
career.guru99.com

 

 

 

100 points
4