1) what is Ext JS and the name library on which it extended?
Answer:
It is a JavaScript framework to develop rich UI web-based desktop applications. Ext JS stands for extended JavaScript. It is a Sencha product extended from YUI (Yahoo user interface).
2. what is the difference between Ext JS and jQuery?
Answer:
These are the basic ExtJS Interview Questions asked in an interview. Both the frameworks are quite different; we can compare ExtJS and jQuery UI as Ext JS is a full-fledged UI rich framework. But still, Ext JS has many more components then jQuery UI.
3. Explain ViewModel in MVVM architecture?
Answer:
In MVVM architecture controller of MVC is replaced by ViewModel.
ViewModel: − it is responsible for mapping between views and models.
Is it responsible for wrapping of the data from the model to view? It does it without having any interaction with the view of the UI. It has only knowledge of the model.
Let us move to the next ExtJS Interview Questions.
4. What is the use of Ext.onReady()?
Answer:
Ext.onReady() is the first method which is called when the DOM is fully loaded so that whatever element we want to refer will be available when a script runs.
5. Program to write before and after load events in the store?
Answer:
grid.getStore().on ({
beforeload : function(store) {
// do whater operation needed as per requirments
},
load : {
fn : function(store) {
// do whatever operation needed as per requirements
},
scope : this
}
store.load();
});
Part 2 – ExtJS Interview Questions (Advanced)
Let us now have a look at the advanced Interview Questions and Answers.
6. Explain renderer and its use?
Answer:
A renderer is used when we want to manipulate the data which we get from the store to show manipulated data based on some criteria.
It is a column property that can be used as: –
renderer: function(value, metadata, record, rowIndex, colIndex, store){
// logic to perform operation
}
7. What are all the layouts in Ext JS?
Answer:
Different type of layouts is in Ext JS −
Absolute, Accordion, Anchor, Border, Auto, hBox, vBox, Card(TabPanel), Card(Wizard), Column, Fit, Table
8. Explain vType in Ext JS?
Answer:
This is the validation type that can be customized easily. Few vType provided by Ext JS are −
emailText: − This returns false if a text is not a valid email address.
alphanumText: − This returns false if the text entered has any symbol other than an alphabetic or numeric value.
9. Explain the latest version of Ext JS and its benefits?
Answer:
The latest version of Ext is version 6th which brought the benefit that it can be used for both desktop and as well as mobile applications. Basically, it is a merge of Ext JS (desktop applications) and Sencha touch (mobile application).
10. What are the Ext JS implementation tools?
Answer:
Ext JS can be implemented on any popular integrated development environment (IDE) such as Eclipse, Sublime, Aptana, Westrom, etc.