Skip to main content

ExtJS4 FAQ

Extjs 4.2 FAQ:

What is Ext?
The Ext namespace (global object) encapsulates all classes, singletons, and utility methods provided by Sencha's libraries.
Ext is singleton object.

Ext.Base – all classes inherit from Ext.Base. It provides basic low-level functionality used by all classes
Ext.Class – a factory for making new classes
Ext.ClassLoader – responsible for ensuring that classes are available, loading them if they aren’t on the page already
Ext.ClassManager – kicks off class creation and manages dependencies
Ext.ComponentManger -base class for all Ext components

The onReady() function takes  a function as an argument. The onReady() function is called when the document is loaded and DOM is ready.
Adds a function to be called when the DOM is ready, and all required classes have been loaded
Ext.onReady(function () {
});


- Ext.define to signal class definition to complete.
Ext.define -> Ext.Class {
Pre-Processors: loader - extends - mixins - config - Statics => Post-Processors executed as
Post-Processors: Aliases - singleton -legacy => callback function
}

1.How to define new class in ExtJS 4:
Using Ext.define()
eg: Ext.define('App.MyClass',{ });

Question#2:
What is prefered method for creating class object?
Ext.create('className');
eg:  var temp = Ext.create('App.MyClass',{ });
// Using Ext.create
Ext.create('widget.coolpanel');

// Using the shorthand for defining widgets by xtype
var win = new Ext.widget('window');
Ext.widget('panel', { });

Question#3:
Which of the following is responsible for dynamic dependency loading?:
Ext.requires({ });

Question#4:
Which is the root class of all classes created with Ext.define
Ext.Base
All classes in Ext inherit from Ext.Base.

Question#5:
what is 'alias' ? type of alias used in Extjs?
shortcut name aliases for class names.
eg:
alias: ['widget.coolpanel'],
alias: ['plugin.ajaxpush'],

what is alternateClassName?
Defines alternate names for this class
eg:
Ext.define('Developer', {
    alternateClassName: ['Coder', 'Hacker']
    });

Question#6:
Which of the following state provider is bundled with ExtJS 4?
CookieProvider

Question#7:
Which of the following is a wrapper for DOM elements?
Ext.dom.Element

Question#8:
Which of the following is a base class for all Ext components?
Ext.ComponentManger

Question#9:
Template can be define using ?
Ext.XTemplate

Question#10:
What is xtype? purpose of xtype?
This property provides a shorter alternative to creating objects than using a full class name.
xtype improve performance by lazy instantiation.
Instead of explicitly creating components during initialization a component with an xtype can be created implicitly as an object config.
-xtype don't instantiate the class when Ext.onReady runs.
eg: xtype : 'panel'
    xtype: 'mainform'


Question#11:
Special type of component that can contain other components is called?
Custom component

Question#12:
refs in a controller represents _____.?
Reference to the UI components

Question#13:
Which of the following encapsulates a client side cache of Model objects
Store

Question#14:
Which of the following is NOT a client side proxy?
AjaxProxy
//Client-side proxy is memory proxy

Question#15:
Which proxy sends cross-domain requests?
JsonPProxy
eg: Twitter data

Question#16:
Which of the following config can be use to define endpoints for read, create, update & delete operation in the server proxy?
api

Question#17:
How can you transfer data from a Model to a Form?
Ext.form.Panel.loadRecord(model record);

Question#18:
Proxy can be define in ______?
Model and Store

Question#19:
Which of the following is NOT a type of association in the Model?
ManyToMany

How to define Hashmapin Extjs?
var map = new Ext.util.HashMap();
map.add('key1', 1);
map.add('key2', 2);
map.add('key3', 3);

OOPs concept:
Object-oriented programming is intended to promote greater flexibility and maintainability in programming,

Namespace - A container which allows developers to bundle all functionality under a unique, application-specific name.

Class - Defines the characteristics of the object. It is a template definition of variables and methods of an object.

Object - An Instance of a class.

Constructor - A method called at the moment of instantiation of an object. It usually has the same name as that of the class containing it.

Inheritance - A class can inherit characteristics from another class.
eg: extends : 'parent className'


Comments

Post a Comment