×

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

Related Topics

Top 15 Ext Js Interview Question for 2024

1) What is Ext Js? Ext Js refers to Extended JavaScript. Ext JS is a JavaScript framework used to built interactive cross platform web application. 2) What are the features of Ext...

3 minutes read.

Top 22 DOJO Interview Questions for 2024

1) What is DOJO? DOJO is an open source JavaScript framework designed for very fast development of JavaScript/AJAX based application and websites having cross platform interdependencies. 2) Enlist all features of DOJO. ...

4 minutes read.

Top 15 Data structure & Algorithm Interview Questions for 2024

1) What is Data Structure? Data structure is a way of storing, collecting and organizing data into the main memory. It makes data access more efficient and increase performance. Array, List, Queue...

3 minutes read.

Top 25 Oracle DBA Interview Question for 2024

1) What is an Oracle Instance? Database instance is a set of memory structures that manages database file. When an instance is started Oracle database allocate memory area called SGA (System...

4 minutes read.

Top 15 Bootstrap Interview Questions for 2024

1) Explain what is Bootstrap? It is a Framework which is used for building the web application with minimal effort. Bootstrap is also used for developing responsive, mobile-first web sites. 2) What...

10 minutes read.

Top 40 TensorFlow Interview Questions and Answers

Commonly Asked TensorFlow Interview Questions for Fresher Q1. What is TensorFlow? TensorFlow is the machine learning library developed by Google's brain team, it supports multiple abstraction levels, and we can choose the...

13 minutes read.

Top 15 ASP.NET MVC Framework Interview Questions for 2024

1) What is ASP.NET MVC Framework? ASP.NET MVC framework is a software architecture pattern for developing web applications. It is used to split the application's implementation logic into three components: models,...

4 minutes read.

Top 30 Fortran Interview Questions for 2024

1) What is Fortran? Fortran is general purpose, high-level programming language which is used for numeric and scientific computing. 2) What are the features of Fortran programming language? Features of Fortran language are: ...

4 minutes read.

Top 18 Blockchain Interview Questions and Answers for 2024

Top 20 Commonly Asked Blockchain Interview Questions and Answers 1. What do you understand by Blockchain? Blockchain is a chain of blocks made up of digital pieces of information or can be defined as...

6 minutes read.

Top 15 AWS Interview Questions for 2024

1) What is AWS? AWS stands for Amazon Web Services. It is a cloud web hosting platform that offers flexible, scalable, reliable, easy-to-use, and cost-effective solutions. 2) What is Cloud Computing? It is...

2 minutes read.

Top 26 CouchDB interview questions for 2024

1) What is CouchDB? CouchDB is a document typed database server which can be accessed through RESTful JSON API. It is a schema free and Ad-hoc database with a flat address...

4 minutes read.

Top 30 TurboGears Framework Interview Questions for 2024

1) What is TurboGears Framework? TurboGears is a Python Framework. It is used to create rapid web application. It consists of several WSGI (Web Server Gateway Interface) components. It is developed...

5 minutes read.

Top 14 MathML Interview Questions for 2024

1) What is MathML? MathL stands for Mathematical Markup Language. It is extended form of XML. It is used to describe mathematical and scientific notations. 2) Who is the developer of MathML? World...

3 minutes read.

Top 16 OpenStack Interview Questions for 2024

Most Frequently Asked OpenStack Interview Questions and Answers for Freshers 1. Describe OpenStack. OpenStack is designed as the future of cloud computing and developed as free and open-source software that facilitates a...

8 minutes read.

Top 15 ES6 Interview Questions for 2024

Commonly Asked ES6 Interview Questions and Answers 1) What is ES6? ES6 is a scripting language specification standardized. It is used to enable client-side scripting. The specification is influenced by programming languages (Self, Python, Perl,...

2 minutes read.

Top 15 PhantomJS Interview Question for 2024

1) What is PhantomJS? PhantomJS is a lightweight headless scripted browser built on WebKit. It is used for automation web page interaction. 2) Why it is called as headless browser? PhantomJS called as...

4 minutes read.

Bugzilla interview Questions

Frequently asked questions about Bugzilla Q1. What are reports in Bugzilla? A1. Reports can be defined as an interface between the user and the database of Bugzilla. It helps to examine and...

4 minutes read.

Top 15 JSP Interview Questions for 2024

1) What is JSP? It is a technology which is used to create web application like Servlet technology. It provides more functionality than Servlet. It consists of HTML and JSP tags. 2) What are...

3 minutes read.

Top 15 Electron Interview Question for 2024

1) What is Electron? Electron is an open source library developed by Github. It is used to develop cross platform desktop application. 2) Which technology Electron uses? Electron uses Chromium and Node.js with...

3 minutes read.

Top 29 Phalcon Framework Interview Questions for 2024

1) What is Phalcon? Phalcon is an open source framework based on the MVC (Model-View-Controller) pattern. It is the combination of PHP and C language. It is developed by Andres Gutierrez...

6 minutes read.