ui tech qb.docx

6
Question Bank on Front End Technologies 1. Backbone JS 2. Advanced JS 3. Require JS 4. Marionette JS 5. JQuery - Rohit Jain

Upload: sudharsana-reddy

Post on 08-Sep-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Question Bank on Front End Technologies

1. Backbone JS2. Advanced JS3. Require JS4. Marionette JS5. JQuery

Rohit Jain

Backbone JS Mention what are the typical problems you might face with the Backbone view code? Explain what is model.cid? What is Backbone.sync is used for? Explain what is the function of parse? What is the function of escape? What is the function of toJSON? Basic Questions like -> what is backbonejs, what are the components, define them separately. Can we have a Backbone Collection of heterogeneous models? What is difference between find and findWhere method of Collection? Explain what is the function of extend?Advanced JavaScript How can you declare a class in Javascript? Difference between == and ===? Difference between null and undefined? How many datatypes in JS? What can you do to improve page performance? What are IIFE? What are closures? What is use strict? What is Hoisting? Difference between call and apply? How to create native methods? What is prototype? How to use it? How do JavaScript timers work? What is a drawback of JavaScript timers? What is onerror event handler? How to create objects in JavaScript? Whats the output of Console.log( 0.1+0.2 == 0.3) Console.log( null == undefined) Console.log( null === undefined)function ABC(){return {name : abc}function XYZ(){return {name : xyz}What output is expected when you execute ABC(); XYZ(); What should be the output of the followingvar myObject = { color : "red", test : function(){ function testThis(){ console.log(this.color); //undefined console.log(window === this); //true }; testThis(); console.log(this.color); //red console.log(window === this); //false return "done!" }};myObject.test();Require JS What is Require js? What is the advantage of using it? What is AMD? What the difference is between require and define function? Can we call a define inside a define function? How to load cyclic dependencies with require i.e. A->B->A What are the common errors encountered while playing with requirejs? What is shim? How and when to use it? How to load two versions of same library file? For example (Jquery 1.10 and Jquery 1.7)? What happens when you load a function multiple times in different JS files?Marionette Basic Questions - What is Marionette? What are the basic components? Can we have regions inside an ItemView? What is ui : {} in ItemView How to create a scalable app with Marionette.Jquery What is difference between body onload function and $(document).ready()? Can we have multiple body onload function defined? Will they be executed? Can we have multiple $ document ready functions? Whats the advantage of having multiple? How to do deep cloning with jquery? While cloning, if any events are binded to the object, will they be cloned as well? What does $ represent? Can we use our own specific character in the place of $ sign in jQuery? What is jQuery.noConflict? What are selectors in jQuery and how many types of selectors are there? Difference between $(this) and 'this' in jQuery? What is event bubbling and capturing? Explain .bind() vs .live() vs .delegate() vs .on() Whats the output sequence of $(document).ready(function(){Console.log(Before calling inner document ready); $(document).ready(function(){Console.log(In inner document ready);});Console.log(After inner document ready); });