Interview Questions

AJAX Interview Questions Android Interview Questions Angular 2 Interview Questions AngularJs Interview Questions Apache Presto Interview Questions Apache Tapestry Interview Questions Arduino Interview Questions ASP.NET MVC Interview Questions Aurelia Interview Questions AWS Interview Questions Blockchain Interview Questions Bootstrap Interview Questions C Interview Questions C Programming Coding Interview Questions C# Interview Questions Cakephp Interview Questions Cassandra Interview Questions CherryPy Interview Questions Clojure Interview Questions Cobol Interview Questions CodeIgniter interview Questions CoffeeScript Interview Questions Cordova Interview Questions CouchDB interview questions CSS Buttons Interview Questions CSS Interview Questions D Programming Language Interview Questions Dart Programming Language Interview Questions Data structure & Algorithm Interview Questions DB2 Interview Questions DBMS Interview Questions Django Interview Questions Docker Interview Questions DOJO Interview Questions Drupal Interview Questions Electron Interview Questions Elixir Interview Questions Erlang Interview Questions ES6 Interview Questions and Answers Euphoria Interview Questions ExpressJS Interview Questions Ext Js Interview Questions Firebase Interview Questions Flask Interview Questions Flex Interview Questions Fortran Interview Questions Foundation Interview Questions Framework7 Interview Questions FuelPHP Framework Interview Questions Go Programming Language Interview Questions Google Maps Interview Questions Groovy interview Questions GWT Interview Questions Hadoop Interview Questions Haskell Interview Questions Highcharts Interview Questions HTML Interview Questions HTTP Interview Questions Ionic Interview Questions iOS Interview Questions IoT Interview Questions Java BeanUtils Interview Questions Java Collections Interview Questions Java Interview Questions Java JDBC Interview Questions Java Multithreading Interview Questions Java OOPS Interview Questions Java Programming Coding Interview Questions Java Swing Interview Questions JavaFX Interview Questions JavaScript Interview Questions JCL (Job Control Language) Interview Questions Joomla Interview Questions jQuery Interview Questions js Interview Questions JSF Interview Questions JSP Interview Questions KnockoutJS Interview Questions Koa Interview Questions Laravel Interview Questions Less Interview Questions LISP Interview Questions Magento Interview Questions MariaDB Interview Questions Material Design Lite Interview Questions Materialize CSS Framework Interview Questions MathML Interview Questions MATLAB Interview Questions Meteor Interview Questions MongoDB interview Questions Moo Tools Interview Questions MySQL Interview Questions NodeJS Interview Questions OpenStack Interview Questions Oracle DBA Interview Questions Pascal Interview Questions Perl interview questions Phalcon Framework Interview Questions PhantomJS Interview Questions PhoneGap Interview Questions Php Interview Questions PL/SQL Interview Questions PostgreSQL Interview Questions PouchDB Interview Questions Prototype Interview Questions Pure CSS Interview Questions Python Interview Questions R programming Language Interview Questions React Native Interview Questions ReactJS Interview Questions RequireJs Interview Questions RESTful Web Services Interview Questions RPA Interview Questions Ruby on Rails Interview Questions SAS Interview Questions SASS Interview Questions Scala Interview Questions Sencha Touch Interview Questions SEO Interview Questions Servlet Interview Questions SQL Interview Questions SQL Server Interview Questions SQLite Interview Questions Struts Interview Questions SVG Interview Questions Swift Interview Questions Symfony PHP Framework Interview Questions T-SQL(Transact-SQL) Interview Questions TurboGears Framework Interview Questions TypeScript Interview Questions UiPath Interview Questions VB Script Interview Questions VBA Interview Questions WCF Interview Questions Web icon Interview Questions Web Service Interview Questions Web2py Framework Interview Questions WebGL Interview Questions Website Development Interview Questions WordPress Interview Questions Xamarin Interview Questions XHTML Interview Questions XML Interview Questions XSL Interview Questions Yii PHP Framework Interview Questions Zend Framework Interview Questions Network Architect Interview Questions

Backbone.js Interview Questions

1) What is Backbone.js?

Backbone.js is a JavaScript framework or library. It is a client-side framework which helps in creating single page application in organized manner i.e. structured layout.

2) Backbone.js is written in which language ?

It is written in JavaScript also it has soft dependence on jQuery and hard dependence on UnderscoreJS.

3) Give some history about Backbone.js.

It was released on 13 October,2010 and developed by Jeremy Ashkenas .

4) Enlist the main component of Backbone.js.

  • Model
  • View
  • Controller
  • Router
  • Event

5) Describe Architecture of Backbone.js?

It follows the MVC Architecture:
  • Model - It helps to retrieve code from the server.
  • View - It is a HTML representation.
  • Controller - It saves and writes JavaScript application with its logic.

6) Describe the condition when can we use Backbone.js?

  • When there exist lots of jQuery/JavaScript code then Backbone.js is used to make it simpler and structured.
  • We can use when developing single page web-application.
  • To develop fast application having cleaner and more maintainable code.

7) Describe Backbone.js Events?

Backbone.js Events are the modules which helps the object to bind and trigger the custom events. These events can be called by desired name of our choice.

8) Enlist the method that can manipulate Backbone.js events.

  • On
  • Off
  • Trigger
  • Once
  • Listento
  • Stoplistening
  • Listentoonce

9) Enlist all built-in events in Backbone.js.

  • "add"(model, collection, options)
  • "remove"(model, collection, options)
  • "reset"(collection, options)
  • "sort"(collection, options)
  • "change"(model, options)
  • "change:[attribute]"(model, value, options)
  • "destroy"(model, collection, options)
  • "request"(model_or_collection, xhr, options)
  • "sync"(model_or_collection, resp, options)
  • "error"(model_or_collection, resp, options)

10) What is known as "Heart Of JavaScript Application" in Backbone.js?

Models of Backbone.js are the most important part of building Backbone.js Application due to which it is also known as Heart of JavaScript Application.

11) Define Collection in Backbone.js?

Backbone.js collection is described as ordered set of models. It provides loading and saving of new models to the server. A helper function is created which perform aggregation and computation for a list of models.

12) Enlist the files required to setup Backbone.js.

Three files are required:
  1. jQuery
  2. Backbone
  3. Underscore

13) Give the method that can manipulate Backbone.js collection.

  • Extend
  • Model
  • Initialize
  • toJSON
  • sync
  • Add etc.

14) What does Router in Backbone.js do?

It is used for routing client side application and connects them to their respective events and actions. Also, for an AJAX heavy applications it can be used to change the URL fragment of an application in order to provide bookmark-able and sharable URL's.

15) Explain Backbone.js sync?

It is a function in Backbone.js which is called repeatedly. Backbone.js sync read or save a model to the server and also persist the state of the model to the server.

16) Enlist the method that can manipulate Backbone.js sync.

  • Backbone.emulateHTTP
  • Backbone.emulatejson
  • Backbone.AJAX

17) Explain Backbone.js View.

Backbone.js View represents how your data looks like and model’s data to the user. It can be embedded into any JavaScript Template Library.

18) Define the term Modelbinder.

It is a Class in Backbone.js which is used to make the synchronization process of views and model together.

19) Give Configuration option available in Backbone.js .

  • InitialCopyDirection
  • modelSetOptions
  • change Triggers
  • boundAttribute
  • suppressThrows
  • converter

20) Define model.cid?

It is a special property of models, the cid or client id is automatically assigned to all models when they are first created. It works as an Unique Identifier.

21) What is the function of escape ?

It gets the current value of an attribute from the model but returns the HTML-escaped version of a model’s attribute. It is helpful in preventing XSS attacks, if you are interpolating data from the model into HTML.

22) What is the use of setElement ?

setElement is a function which is used when Backbone view has to be applied to a different DOM element.

23) Explain History in Backbone.js.

Backbone.History is used to keep track of the navigation history of different routes. It is also used to match the appropriate route and callbacks to handle events.

24) What is Template?

Template is used for the view. It is the HTML DOM elements for any View.

24) What is Utility?

Backbone.js Utility class define the following two methods:
  • Backbone.noConflict: This method returns the Backbone object back to its original value. We can also use a local instance of Backbone by using method Backbone.noConflict().
  • Backbone.$: This method allows user to use the particular jquery.

25) What is Converter?

Converter function helps to copy models attribute to a html attribute and vise versa.

26) What is ModelBinder in Backbone.js?

ModelBinder allows to define scope when you create your bindings using jQuery. We can also define scoping with jQuery selectors if the views are complex.

27) What is Memory Leaks in Backbone.js Application?

A memory leak is a gradual loss of available computer memory. It occurs when a program repeatedly fails to return memory it has obtained for temporary use.

28) What is model.attributes ?

The attributes property is the internal hash containing the model’s state, usually a form of the JSON object representing the model data on the server.

29) What is Push State ?

It allow to navigate to URLs without actually needing a page to refresh.

30) Explain Backbone.Model?

A model is a representation of any component use in application. Therefore, a model can be represented as following: Data + Logic = Model