Basic BackBone.js MCQ

1. Which options will allow you to auto-bind a BackboneJs view to existing element(s)?

Answer

Correct Answer: $(".same-class").each(function(index,ele){ var v=new MyView(); $(ele).html(v.$el); });
$(".same-class").each(function(index,ele){ var v=new MyView({el:$(ele)}); });

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

2.

Which of the following events executed when the model validation failed?

Answer

Correct Answer: invalid

Note: This Question is unanswered, help us to find answer for this one

3.

To tell an object to stop listening to events. Either call stopListening with no arguments to have the object remove all of its registered callbacks ... or be more precise by telling it to remove just the events it's listening to on a specific object, or a specific event, or just a specific callback? (choose all that apply)

Answer

Correct Answer: view.stopListening(model);
view.stopListening();

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

4.

Which code is correct to create a template in Backbone.js?

Answer

Correct Answer: <script type="text/template" id="website-list-template"> <table> <thead> <tr> <th>Name</th> <th>Aboutme</th> <th>Portfolio</th> </tr> </thead> <tbody> <% _.each(pages, function(web) { %> <tr> <td><%= web.get('name') %></td> <td><%= web.get('aboutme') %></td> <td><%= web.get('portfolio') %></td> </tr> <% }); %> </tbody> </table> </script>

Note: This Question is unanswered, help us to find answer for this one

5.

Which of the following are built-in events in Backbone?

Answer

Correct Answer: sort

Note: This Question is unanswered, help us to find answer for this one

6.

Using the following code example how can you use fetch with sending id?

Answer

Correct Answer: var Type = Backbone.Model.extend({ urlRoot : "/api/SomeRoute" });

Note: This Question is unanswered, help us to find answer for this one

7.

Which of the following are Backbone Building Blocks? (choose all that apply)

Answer

Correct Answer: Collection
Router

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

8.

Which code is used when model or collection is synced successfully with server?

Answer

Correct Answer: "sync"(model_or_collection, resp, options)

Note: This Question is unanswered, help us to find answer for this one

9.

How do you we get only the first 20 items in a backbone collection?

Answer

Correct Answer: collection.first(20)

Note: This Question is unanswered, help us to find answer for this one

10.

Which of the following route parameter's statement is correct of Router? (choose all that apply) router.route(fun, name, [callback])

Answer

Correct Answer: name: Name of the router parameter
callback: Name of the router, if callback argument is omitted

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

11.

Which of the following code will you use if Defining a root route?

Answer

Correct Answer: App.Router = Backbone.Router.extend({ routes: { '': 'index' }, index: function(){ $(document.body).append("root index route"); } });

Note: This Question is unanswered, help us to find answer for this one

12.

In Backbone, ____ provide a way for you to connect URLs (either hash fragments, or real) to parts of your application. Any piece of your application that you want to be bookmarkable, shareable, and back-button-able needs an URL.

Answer

Correct Answer: routers

Note: This Question is unanswered, help us to find answer for this one

13.

What is Backbone.sync used for?

Answer

Correct Answer: When Backbone wants to save or read a model to the server it calls out a function called as Backbone.sync.

Note: This Question is unanswered, help us to find answer for this one

14.

__ removes all of the view's delegated events. It is useful if you want to disable or remove a view from the DOM temporarily?

Answer

Correct Answer: undelegateEvents

Note: This Question is unanswered, help us to find answer for this one

15.

How can you retrieve a set of model from the server and set them to the collection when they arrive?

Answer

Correct Answer: collection.fetch()

Note: This Question is unanswered, help us to find answer for this one

16.

To create a Collection class of your own, extend Backbone.Collection, providing instance properties, as well as optional classProperties to be attached directly to the collection's constructor function?

Answer

Correct Answer: extend

Note: This Question is unanswered, help us to find answer for this one

17.

In Backbonejs, how can you change templates of a view on the fly?

Answer

Correct Answer: render: function(){ var templateFn = this.options.template || this.template; this.$el.html(templateFn(this.model.attributes)); return this; }

Note: This Question is unanswered, help us to find answer for this one

18.

Which models can be created by extending Backbone?

Answer

Correct Answer: var Todo = Backbone.Model.extend({}); var todo1 = new Todo(); console.log(JSON.stringify(todo1)); var todo2 = new Todo({ title: 'Check the attributes of both model instances in the console.', completed: true }); console.log(JSON.stringify(todo2));

Note: This Question is unanswered, help us to find answer for this one

19.

Which of the following are Backbone Model object functions?

Answer

Correct Answer: omit

Note: This Question is unanswered, help us to find answer for this one

20.

The sync method is called with the following parameters? (choose all that apply)


Answer

Correct Answer: Method
Model
Options

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

21.

You can limit number of models in Collection using the following code?

Answer

Correct Answer: var myCollection = Backbone.Collection.extend({ parse: function(response) { return response.slice(0,20); } });

Note: This Question is unanswered, help us to find answer for this one

22.

How does Backbone decide if it should use POST/GET/ Request to the Server and what are the methods Backbone has Reserved for these Operations?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

23.

Which of the following configuration options are available in Backbone.js

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

24.

Thorax provides an extended event _____ to simplify binding of common events from models and collections?

Answer

Correct Answer: Hash

Note: This Question is unanswered, help us to find answer for this one

25.

This method is called internally within the router, whenever a route matches and its corresponding callback is about to be executed. Return __ from execute to cancel the current transition. Override it to perform custom parsing or wrapping of your routes.

Answer

Correct Answer: false

Note: This Question is unanswered, help us to find answer for this one

26.

Trigger callbacks for the given event, or space-delimited list of events. Subsequent arguments to ___ will be passed along to the event callbacks?

Answer

Correct Answer: trigger

Note: This Question is unanswered, help us to find answer for this one

27.

Which of the following Collection methods is an equivalent to instantiating a model with a hash of attributes?

Answer

Correct Answer: create

Note: This Question is unanswered, help us to find answer for this one

28.

BackboneJS test with jasmine if parameters are passed to fetch?

Answer

Correct Answer: describe("People collection" function() { var people = Backbone.Collection.extend({ }); function searchPeople(people, data ) { people.fetch(data); } it("must verify the fetch parameters!", function(){ var param = {data : {gender : 'male'}}; spyOn(people, 'fetch').andReturn(); // Warning: this makes the call synchronous, Fetch actually won't go through! searchPeople(people, param); expect(people.fetch).toHaveBeenCalled(); expect(people.fetch).toHaveBeenCalledWith(param); }); });

Note: This Question is unanswered, help us to find answer for this one

29.

Which of the following code is Backbone.Events interface is by default mixed into other Back bone components?

Answer

Correct Answer: _.extend(View.prototype, Events, { ... });.

Note: This Question is unanswered, help us to find answer for this one

30.

Rather than adding or removing models individually, you might want to update an entire collection at once. ___ takes an array of models and performs the necessary add, remove, and change operations required to update the collection?

Answer

Correct Answer: Collection.set()

Note: This Question is unanswered, help us to find answer for this one

31.

Is it possible to subscribe on event when backbonejs view is removed from DOM?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

32.

In Backbone, ____ provide a way for you to connect URLs (either hash fragments, or real) to parts of your application. Any piece of your application that you want to be bookmarkable, shareable, and back-button-able needs a URL?

Answer

Correct Answer: routers

Note: This Question is unanswered, help us to find answer for this one

33.

Views are based on ____ templates that provide layouts for rendering?

Answer

Correct Answer: View

Note: This Question is unanswered, help us to find answer for this one

34.

Which of the following code is True about Template Function Call?

Answer

Correct Answer: template class T> class calc { public: T el; calc(T t); }; template class T> calc T>::calc(T t) { el = t; } double the_sum(calc int> &a, calc double> &b) { return a.el + b.el; }

Note: This Question is unanswered, help us to find answer for this one

35.

Which of the following tags are using to specify templates?

Answer

Correct Answer: <% %>

Note: This Question is unanswered, help us to find answer for this one

36.

How can a set of model retrieved from the server and set them to the collection when they arrive?

Answer

Correct Answer: collection.fetch()

Note: This Question is unanswered, help us to find answer for this one

37.

Which of the following events is activates when the requesting to the server failed?

Answer

Correct Answer: error

Note: This Question is unanswered, help us to find answer for this one

38.

How Backbone Decides if it Should Use POST/GET/ Request to the Server and What are the Methods Backbone has Reserved for these Operations?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

39.

How to limit number of models in Collection using the following code?

Answer

Correct Answer: var myCollection = Backbone.Collection.extend({ parse: function(response) { return response.slice(0,20); } });

Note: This Question is unanswered, help us to find answer for this one

40.

Models expose an __ attribute which represents an internal hash containing the state of that model. This is generally in the form of a JSON object similar to the model data you might find on the server but can take other forms?

Answer

Correct Answer: .attributes

Note: This Question is unanswered, help us to find answer for this one

41.

Which of the following is Backbone Model object functions?

Answer

Correct Answer: omit
pick

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

42.

Sync:Manages actual persistence by a function that Backbone calls every time it attempts to read or save a __ to the server?

Answer

Correct Answer: Model

Note: This Question is unanswered, help us to find answer for this one

43.

Models can be created by extending Backbone.Model which of the following?

Answer

Correct Answer: var Todo = Backbone.Model.extend({}); var todo1 = new Todo(); console.log(JSON.stringify(todo1)); var todo2 = new Todo({ title: 'Check the attributes of both model instances in the console.', completed: true }); console.log(JSON.stringify(todo2));

Note: This Question is unanswered, help us to find answer for this one

44.

Which of the following styles of variables is using Backbone in routers?

Answer

Correct Answer: :params

Note: This Question is unanswered, help us to find answer for this one

45.

BackboneJS fetch collection based on parameters using the following code?

Answer

Correct Answer: Genres.Collection = Backbone.Collection.extend({ url: function() { return 'path to my json'; }, initialize: function(opts) { opts = opts || {}; this.genre = opts.genre || 'rock'; }, parse: function(response){ return response.data.genres[this.genre]; } });

Note: This Question is unanswered, help us to find answer for this one

46.

Unbinding function, is used to remove the validation binding on the model and removing all events hooked up on the?

Answer

Correct Answer: Collection

Note: This Question is unanswered, help us to find answer for this one

47.

Which of the following events are exists in Backbone Events System?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

48.

Which of the following dependency must be added for Backbone.js setup?

Answer

Correct Answer: script src =".../underscore-min.js" ></script>

Note: This Question is unanswered, help us to find answer for this one

49.

Backbone offers an opt-in for HTML5 pushState support?

Answer

Correct Answer: window.history.push State

Note: This Question is unanswered, help us to find answer for this one

50.

In Backbone.js, modelbinder class is used to make synchronization process of and together?

Answer

Correct Answer: Views, models

Note: This Question is unanswered, help us to find answer for this one

51.

Suppose what are the typical problems you might face with the Backbone view code?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

52.

The default sync handler maps CRUD to REST?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

53.

What are the default Backbone.Sync handlers?

Answer

Correct Answer: create, update, patch, delete, read

Note: This Question is unanswered, help us to find answer for this one

54.

Backbone.sync, transforms the __ and __ operations into HTTP requests?

Answer

Correct Answer: Fetch(), save()

Note: This Question is unanswered, help us to find answer for this one

55.

____ gives a direct reference to the attributes and you should be careful when playing with it. Best practice would suggest that you use .set() to edit attributes of a model to take advantage of backbone listeners?

Answer

Correct Answer: obj.attributes

Note: This Question is unanswered, help us to find answer for this one

56.

Backbone.sync is a _____ to synchronize your collections and models across the systems?

Answer

Correct Answer: Method

Note: This Question is unanswered, help us to find answer for this one

57.

The architecture of Backbone.js contains the following modules?

Answer

Correct Answer: HTTP Request
Router
Events

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

58.

Which of the following method is enables History API?

Answer

Correct Answer: Backbone.history.start();

Note: This Question is unanswered, help us to find answer for this one

59.

Underscore is primarily used for its utility __ and json2.js?

Answer

Correct Answer: Methods

Note: This Question is unanswered, help us to find answer for this one

60.

You can remove all listeners on a particular object by using?

Answer

Correct Answer: Instance_id.off();

Note: This Question is unanswered, help us to find answer for this one

61.

In Backbone.JS how do you pass two models to view while creating object of a view using the following code?

Answer

Correct Answer: var Passingmodel = new Backbone.Model(); var clientModel = new ClientModel(); var allClientModel = new AllClientModel(); Passingmodel .set({contacts: clientModel , users: allClientModel }); var clientView = new ClientView({model: Passingmodel });

Note: This Question is unanswered, help us to find answer for this one

62.

Which of the following options can be passed directly to the View?

Answer

Correct Answer: el
id

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

63.

In BackboneJS, It's possible to auto-bind BackboneJs view to existing element(s)?

Answer

Correct Answer: $(".same-class").each(function(index,ele){ var v=new MyView(); $(ele).html(v.$el); });

Note: This Question is unanswered, help us to find answer for this one

64.

How can you will use Underscore Templates in Backbone.js Views?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

65.

Create a view that will build it's own DOM element using the following code?

Answer

Correct Answer: var myNewView = new LibraryView({model: thisBook, tagName: 'ul', className: 'libraryview', id: 'library', attributes: {'data-date': new Date()} }); console.log(myNewView.el);

Note: This Question is unanswered, help us to find answer for this one

66.

True or false: removes method removes listeners from the removed element.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

67.

In BackboneJS, Read the following code and can you change templates of a view on the fly?

Answer

Correct Answer: render: function(){ var templateFn = this.options.template || this.template; this.$el.html(templateFn(this.model.attributes)); return this; }

Note: This Question is unanswered, help us to find answer for this one

68.

Which following statement is correct about attach Listeners to Events in a View?

Answer

Correct Answer: Use the “events” attribute of Backbone.View. Remember that event listeners can only be attached to child elements of the “el” property.

Note: This Question is unanswered, help us to find answer for this one

69.

A Backbone view to a different DOM element, use __, which will also create the cached $el reference and move the view's delegated events from the old element to the new one?

Answer

Correct Answer: setElement

Note: This Question is unanswered, help us to find answer for this one

70.

If {parse: __} is passed as an option, the attributes will first be converted by parse before being set on the model.

Answer

Correct Answer: true

Note: This Question is unanswered, help us to find answer for this one

71.

Which method can be used to create a deep copy of the object?

Answer

Correct Answer: replicate

Note: This Question is unanswered, help us to find answer for this one

72.

Which code creates a template in Backbone.js?

Answer

Correct Answer: <script type="text/template" id="website-list-template"> <table> <thead> <tr> <th>Name</th> <th>Aboutme</th> <th>Portfolio</th> </tr> </thead> <tbody> <% _.each(pages, function(web) { %> <tr> <td><%= web.get('name') %></td> <td><%= web.get('aboutme') %></td> <td><%= web.get('portfolio') %></td> </tr> <% }); %> </tbody> </table> </script> 

Note: This Question is unanswered, help us to find answer for this one

73.

How can the default sync handler map CRUD to REST?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

74.

Which of the following iteration functions exist in Backbone Collections?

Answer

Correct Answer: last

Note: This Question is unanswered, help us to find answer for this one

75.

Which method can be used to create own Model?

Answer

Correct Answer: extend

Note: This Question is unanswered, help us to find answer for this one

76.

How can a Backbone Model be created? Check all that apply.

Answer

Correct Answer: var Todo = Backbone.Model.set({});
var Todo = Backbone.Model.extend({});

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

77.

Which of the following tags are used to specify templates?

Answer

Correct Answer: <% %>

Note: This Question is unanswered, help us to find answer for this one

78.

Which method can be used to remove Models associations ?

Answer

Correct Answer: clear

Note: This Question is unanswered, help us to find answer for this one

79.

Which code example can you use fetch with sending id?

Answer

Correct Answer: var Type = Backbone.Model.extend({ urlRoot : "/api/SomeRoute" });

Note: This Question is unanswered, help us to find answer for this one

80.

How can a set of models be retrieved from the server and into the collection when they arrive?

Answer

Correct Answer: collection.retrive()

Note: This Question is unanswered, help us to find answer for this one

81.

According to the code below, how can a model be removed from a collection and server? var myCollection = new MyCollection(); ... var myModel = myCollection.get(2); ...

Answer

Correct Answer: myCollection.destroy(myModel)

Note: This Question is unanswered, help us to find answer for this one

82.

Which code is True about Backbone.Collection?

Answer

Correct Answer: var TodoList = Backbone.Collection.extend({ model: TodoItem }); var todoList = new TodoList();

Note: This Question is unanswered, help us to find answer for this one

83.

Which method can be used for updating URL?

Answer

Correct Answer: navigate

Note: This Question is unanswered, help us to find answer for this one

84.

Which styles of variables are using Backbone in routers?

Answer

Correct Answer: :params
*splats

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

85.

Which code will you use when Defining a root route?

Answer

Correct Answer: App.Router = Backbone.Router.extend({ routes: { '': 'index' }, index: function(){ $(document.body).append("root index route"); } });
App.Router = Backbone.Router.extend({ routes: { '': 'index' }, index: function(){ $(document.body).append("root index route"); } });

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

86.

Backbone offers an opt-in for HTML5 pushState support. Which one of the following is correct?

Answer

Correct Answer: window.history.push State

Note: This Question is unanswered, help us to find answer for this one

87.

Which of the following events is executed when the model validation fails?

Answer

Correct Answer: invalid

Note: This Question is unanswered, help us to find answer for this one

88.

How can an event be binded to an object?

Answer

Correct Answer: object.on(event, callback)

Note: This Question is unanswered, help us to find answer for this one

89.

What are the Events of Backbone JS? (choose all that apply)

Answer

Correct Answer: var myModel = Backbone.Model.extend({ defaults : { title : ‘title’, description : ’description, owner : ‘anonymous’, date : ‘no date supplied’ } });
var object = {}; _.extend(object, Backbone.Events); object.on("fire ", function() { alert("Ouch, you just kick me"); }); object.trigger("fire");
var object = {}; _.extend(object, Backbone.Events); object.on("alert", function(msg) { alert("Trigger " + msg); }); object.trigger("alert", "event");

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

90.

Which option will tell an object to stop listening to events by either calling stopListening with no arguments to have the object remove all of its registered callbacks ... or by telling it to remove just the events it's listening to on a specific object, or a specific event, or just a specific callback? (choose all that apply)

Answer

Correct Answer: view.stopListening(model);

Note: This Question is unanswered, help us to find answer for this one

91.

"This method removes callback functions or all events from an object." What option describes the above.

Answer

Correct Answer: destroy

Note: This Question is unanswered, help us to find answer for this one

92.

Which of the following is a built-in event in Backbone?

Answer

Correct Answer: sort

Note: This Question is unanswered, help us to find answer for this one

93.

Which of the following events is activated when the request to the server fails?

Answer

Correct Answer: error

Note: This Question is unanswered, help us to find answer for this one

94.

Which of the following libraries provide events for Backbone views? (choose all that apply)

Answer

Correct Answer: Jquery
ZeptoJS

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

95.

Which of the following attaches event listeners into the View?

Answer

Correct Answer: var DocumentRow = Backbone.View....{  ... // events: { ... }, ... });
var DocumentRow = Backbone.View....{  ... // events: { ... }, ... });
var DocumentRow = Backbone.View....{  ... // events: { ... }, ... });

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

96.

Which code gets index by Backbone.Collection? var Items = Backbone.Collection.extend({ model : Item, url : "/items" }); var items = new Items; items.fetch();

Answer

Correct Answer: items.at(0);

Note: This Question is unanswered, help us to find answer for this one

97.

Which statement is valid for setting initial values to the model attributes?

Answer

Correct Answer: var MyModel = Backbone.Model....({ init : { "atribute1": "atribute2": } });

Note: This Question is unanswered, help us to find answer for this one

98.

Which code can you use for the deleteLists?

Answer

Correct Answer: deleteList: function() { if (confirm(delete a list?')) { bTask.views.activeListMenuItem.model.destroy(); } return false; }

Note: This Question is unanswered, help us to find answer for this one

99.
True or false: sync method invokes after successful connection with a server.
 

 

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

100.
Using the following code example, How to use fetch with sending id?
 

 

Answer

Correct Answer: Both of the above

Note: This Question is unanswered, help us to find answer for this one

101.
Which function is called when a Collection, Model is created?
 

 

Answer

Correct Answer: create

Note: This Question is unanswered, help us to find answer for this one

102.
Which of the following is not an Underscore utility function over Collections?
 

 

Answer

Correct Answer: length

Note: This Question is unanswered, help us to find answer for this one

103.
Which of the following code is get index by Backbone.Collection? var Items = Backbone.Collection.extend({ model : Item, url : "/items" }); var items = new Items; items.fetch();

 

Answer

Correct Answer: items.get(0);

Note: This Question is unanswered, help us to find answer for this one

104.
True or false: The collections can`t nested another collection.
 

 

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

105.
Which of the following types can be used in templates?
 

 

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

106.
Which of the following libraries can be used for defining Backbone template?
 

 

Answer

Correct Answer: underscore

Note: This Question is unanswered, help us to find answer for this one

107.
True or false: el and $el are the same methods.
 

 

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

108.
Which of the following iteration function are exists in Backbone Collections?
 

 

Answer

Correct Answer: first
last

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

109.
Which of the following will not continue and the attributes of the model will not be modified on the server?

 

Answer

Correct Answer: .save()

Note: This Question is unanswered, help us to find answer for this one

110.
Which of the following router methods is usually used while implementing login functionality?

 

Answer

Correct Answer: execute

Note: This Question is unanswered, help us to find answer for this one

111.
Which of the following methods can be called after all routers creation?
 

 

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

112.
True or false: fetch method call the server and populates the collection.
 

 

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

113.
Which of the following properties can be used for manipulating DOM element?
 

 

Answer

Correct Answer: el

Note: This Question is unanswered, help us to find answer for this one

114.
Which of the following template engines can be used with Backbone views?
 

 

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

115.
Which of the following libraries provides events for Backbone views?
 

 

Answer

Correct Answer: ZeptoJS

Note: This Question is unanswered, help us to find answer for this one

116.
Which of the following syntax is valid in events for Backbone views?
 

 

Answer

Correct Answer: “event css-selector”: “function”

Note: This Question is unanswered, help us to find answer for this one

117.
True or false: $ is always available in Backbone applications?
 

 

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

118. Which of the following two Options are the Backbone.Model events?

Answer

Correct Answer: Change

Note: This Question is unanswered, help us to find answer for this one

119. In relation to JSHint check eqeqeq. all the equality operations are carried out using which of the following options?

Answer

Correct Answer: LI 2.-

Note: This Question is unanswered, help us to find answer for this one

120. Which two of the following options are the ItemView Life-Cycle Event callbacks?

Answer

Correct Answer: onBeforeltemAdded
onBeforeRender
onRender

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

121. Which of the following functions are used by Thorax.Model for extending Backbone’s default model?

Answer

Correct Answer: LayoutViewl)
isPopulated

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

122. Which of the following options must be included to the user page before including backgridjs?

Answer

Correct Answer: Backbone

Note: This Question is unanswered, help us to find answer for this one

123. While using Handlebars with Backbone.js, which of the following options can be used for inserting comments into templates?

Answer

Correct Answer: {{I comment }}
{{- comment -]}

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

124. Backbone memento is used for which of the following options?

Answer

Correct Answer: For keeping track of model changes.

Note: This Question is unanswered, help us to find answer for this one

125. While using Handlebars with Backbonejs, which of the following Options is used for iterating through the collection?

Answer

Correct Answer: #each expression

Note: This Question is unanswered, help us to find answer for this one

126. Backbone.js should be used under which of the following situations?

Answer

Correct Answer: For adding or replacing DOM elements to the application.
For showing animation in an application.

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

127. In relation to Thorax, which of the following options acts as a container for another View and also allows this contained view to be replaced easily?

Answer

Correct Answer: LayoutView

Note: This Question is unanswered, help us to find answer for this one

128.

While working with Backbonejs, which of the following options is the correct syntax of the function which is used for resetting the state of a model object to the same as it is on the server side? (Consider the variable is thisExample, the success message is Fetch is successful., and the error message is Fetch results in error.)


Answer

Correct Answer:

thisExample = fetch([

success: function(model, response){

console.log('Fetch is successful.');

].

error: function(model, response)[

console.log('Fetch results in error.');

I

l): 



Note: This Question is unanswered, help us to find answer for this one

129. While installing Backbone.js. which of the following options is the only hard dependency that must be included?

Answer

Correct Answer: Underscorejs

Note: This Question is unanswered, help us to find answer for this one

130. In a Backbonejs model, which of the following attributes is generated automatically by Backbone when the model is first created, and is used for identifying the model that has not been saved to the server and does not have its real ID available?

Answer

Correct Answer: cid

Note: This Question is unanswered, help us to find answer for this one

131.

Arrange the given steps of Test-Driven Development in the correct order?

i) Write production code

ii) Run test expecting failure

iii) Refactor code

iv) Write test

v) Repeat

vi) Run test suite


Answer

Correct Answer:

i), vi), iii). ii). iv). v)


Note: This Question is unanswered, help us to find answer for this one

132. Which of the following options helps in grouping of related models. handling the loading and saving of new models to the server and providing helper functions that performs aggregations or computations against a list of models?

Answer

Correct Answer: Collection

Note: This Question is unanswered, help us to find answer for this one

133.

After setting the back-end server, which of the following commands is used for setting the urlRoot attribute of the Backbone.js Model object? Consider that the url is http://localhostz8080lexamplesl,and the variable is Example.

Answer

Correct Answer:

Example.Backbone.Model.extend([

urlRoot=

Note: This Question is unanswered, help us to find answer for this one

134. In relation to UglinyS task configuration options, which of the following Options is the default value of report option?

Answer

Correct Answer: true

Note: This Question is unanswered, help us to find answer for this one

135. In relation to Grunt plugin QUint task configuration options, which of the following options is the default value of timeout option?

Answer

Correct Answer: 4.000 milliseconds

Note: This Question is unanswered, help us to find answer for this one

136. Which of the following options is NOT a correct feature of Backbone.js?

Answer

Correct Answer: Backbone.js can be used for creating mobile applications in well-structured manner.

Note: This Question is unanswered, help us to find answer for this one

137. Which of the following Backbone.js model methods is used for determining the previous value of the changed attribute?

Answer

Correct Answer: changedAttributes

Note: This Question is unanswered, help us to find answer for this one

138. Which of the following Backbone.js options is used for providing the ability to undo previous changes and triggering the events when there are unsaved changes?

Answer

Correct Answer: Backbone.trackit

Note: This Question is unanswered, help us to find answer for this one

139. In relation to Yeoman tool. which of the following options is a package manager for libraries and frameworks that are used within web applications?

Answer

Correct Answer: Bower

Note: This Question is unanswered, help us to find answer for this one

140.

In relation to templateSettingS parameter in Backbone.js. which of the following code snippets can be used for specifying the use of [{ ]) instead of <96 96>?

Answer

Correct Answer:

vartemplateExample =[

interpolate : V[\[(.+?)\}/]\g

I;



Note: This Question is unanswered, help us to find answer for this one

141. In relation to the attribute changes in Backbonejs models, which of the following options is used to return true if an attribute has changed since the last change event?

Answer

Correct Answer: hasChanged()

Note: This Question is unanswered, help us to find answer for this one

142. Which of the following Backbone.js functions is used for switching the DOM element that the view is applied to during the application Iifecycle?

Answer

Correct Answer: .setEIement()

Note: This Question is unanswered, help us to find answer for this one

143. In relation to Jasmine matchers. which of the following matchers compares using the === function?

Answer

Correct Answer: toBe( value)

Note: This Question is unanswered, help us to find answer for this one

144. In relation to Grunt uglily task, which of the following options is the correct tag that is used for allowing conf‌iguration properties to be included in the task?

Answer

Correct Answer: <%= %>

Note: This Question is unanswered, help us to find answer for this one

145. In relation to Backbone.js. which of the following functions is NOT performed by a model?

Answer

Correct Answer: Loading and saving from the server.

Note: This Question is unanswered, help us to find answer for this one

146. In relation to Backbone UI, which of the following f‌iles that are contained in the source distribution of Backbone UI must be included to the HTML page?

Answer

Correct Answer: Both Options a and b.

Note: This Question is unanswered, help us to find answer for this one

147. While using BackbonelocalStorage, which of the following options is used for def‌ining a new localStorage parameter for the collection?

Answer

Correct Answer: localStorage : new Backbone.LocalStorage("libraryappzMyLibrary").

Note: This Question is unanswered, help us to find answer for this one

148. Which of the following Backbone.js options provides a local caching mechanism for the data so that if the app goes Offline, the data still continues to be stored and is synced with the server when connectivity is restored?

Answer

Correct Answer: Backbone.localStorage

Note: This Question is unanswered, help us to find answer for this one

149. In relation to File Array format. which of the following additional Grunt file properties when set to true. Is used for allowing the user to build the f‌ile object dynamically?

Answer

Correct Answer: Dot

Note: This Question is unanswered, help us to find answer for this one

150. Suppose you defined a new View named ExampIeView using Backbone.js. Which of the following commands is used for creating a new instance named myViewExample of this View?

Answer

Correct Answer: myViewExampIe = new ExampleView();

Note: This Question is unanswered, help us to find answer for this one

151. While installing Backbone.js. which of the following options is required to be included for older internet explorer support?

Answer

Correct Answer: json2.js

Note: This Question is unanswered, help us to find answer for this one

152. in relation to Globbing patterns for f‌iles in Grunt, which of the following options is used for matching a single character but not I?

Answer

Correct Answer: *

Note: This Question is unanswered, help us to find answer for this one

153.

With regard to dealing with files in Grunt, which of the following Options is the correct property that is used to remove all path parts from the dest paths?

Note: The given options are the properties that can be used when expand = true.


Answer

Correct Answer:

Flatten 


Note: This Question is unanswered, help us to find answer for this one

154.

Which of the following modules are the parts of Backbone.js?

i) Events

ii) HTTPS Request

iii) Router

iv) HTTP Request


Answer

Correct Answer:

All options i). ii). iii) and iv).


Note: This Question is unanswered, help us to find answer for this one

155.

Select if True or False.

Backbone.trackit cannot be applied to individual model objects, using the startTracking function.


Answer

Correct Answer:

False


Note: This Question is unanswered, help us to find answer for this one

156. Which of the following options is used for setting a new set of events and handlers for the View and removing the previous events?

Answer

Correct Answer: delegateEvents()

Note: This Question is unanswered, help us to find answer for this one

157. Which of the following statements is/are NOT correct about the Backbone.js views?

Answer

Correct Answer: Both the statements a and b are incorrect.

Note: This Question is unanswered, help us to find answer for this one

158.

While using Backbonejs, which of the following syntaxes is used for extending any basic objects with the Backbone event capability?

Answer

Correct Answer:

var object = {};

_.extend(object, Backbone.Events);



Note: This Question is unanswered, help us to find answer for this one

159. In relation to Jasmine-jQuery matchers, which of the following arguments is passed to the toContain matcher that is used for checking the internals of an element for the presence of other elements?

Answer

Correct Answer: jOuerySelector

Note: This Question is unanswered, help us to find answer for this one

160. Which of the following Backbonejs collection methods is used for adding a model at the beginning of a collection?

Answer

Correct Answer: collection.unshift(model. [options])

Note: This Question is unanswered, help us to find answer for this one

161. Which of the following options is NOT a CollectionView Life-Cycle Event callback?

Answer

Correct Answer: onClose

Note: This Question is unanswered, help us to find answer for this one

162. In relation to RequireJS configuration options, which of the following options is used for specifying an array of dependencies to load immediately after processing of the configuration of RequireJS?

Answer

Correct Answer: deps

Note: This Question is unanswered, help us to find answer for this one

163. In relation to Jasmine-jOuery matchers. which of the following options is the correct syntax of the matcher that is used for checking if an event was triggered on the element?

Answer

Correct Answer: toHaveBeenTriggered( event, handler)

Note: This Question is unanswered, help us to find answer for this one

164.

Which of the following options is the correct OUnit callback that runs after each assertion and provides the result of the test case (either error or log) along with the message?


Answer

Correct Answer:

QUnitJog = function(results, message)[

];



Note: This Question is unanswered, help us to find answer for this one

165. While using JavaScript, which of the following string functions is used for extracting a subString from the string that begins at the start position through the specif‌ied number of characters?

Answer

Correct Answer: subString

Note: This Question is unanswered, help us to find answer for this one

166. In relation to Backbone.ModeI, which of the following options is NOT a valid callback parameter of the request event?

Answer

Correct Answer: value

Note: This Question is unanswered, help us to find answer for this one

167. Which of the following options is the correct syntax of command that is used for installing the Grunt command-line interface globally?

Answer

Correct Answer: npm install -g grunt-cli

Note: This Question is unanswered, help us to find answer for this one

168. Which of the following commands is used for installing the JavaScript tool. Yeoman?

Answer

Correct Answer: npm install -g yeoman

Note: This Question is unanswered, help us to find answer for this one

169.

In relation to RequireJS configuration options, which of the following is the correct option that is used for setting the baseUrl to point to the app directory?


Answer

Correct Answer:

require.config({

baseUrl:

Note: This Question is unanswered, help us to find answer for this one

170.

In Backbonejs, which of the following Options is the correct syntax of creating 8 Fruit Object having default attributes name with value Mango, and season with value Summer are also added, and the message “Fruits are healthy!" is written to console?


Answer

Correct Answer:

Fruit = Backbone.Model.extend({

initialize.function()[

console.log(

Note: This Question is unanswered, help us to find answer for this one

search
BackBone.js Subjects