violinista
23 Aug 2007, 3:50 AM
1. What does the "id" parameter in grid's columnModel mean? I don't get it.
2. When I close tab in center panel of borderLayout, does it last until I close browser or it frees memory immediately(hope the latter is true)?
3. Good practice of making rich Ext's applications:: if I follow Saki's proposed way (http://extjs.com/forum/showthread.php?t=6564) for private and public methods in javaScript, is good practice for making standaard private methods on old-fashion way, like:
//PRIVATE METHODS:
var makeDocumentsGrid = function(gridContainer) {
//makes and renders grid in provided container
return grid;
}
var makeNewDocumentForm = function(frmContainer) {
//makes and renders form for new document into provided container
return form;
}
var doSubmitOfNewDocumentForm = function(frm) {
//do all the stuff about submitting all document
return response;
}
//....
//INIT - main method - which is public:
init: function() {
makeDocumentsGrid(panel1);
makeNewDocumentForm(panel2);
//etc...
}
You see, I'm asking this twisted question just because I saw across examples in forum that people for all components in their applications make objects and you can see:
var test=new DocumentsForm();So, is the "good practice" making objects and instanting them across the application, or is better to control the components via init public procedure, without too much juggling with objects (except, of course, Ext's objects-they are unavoidable)?
Sorry for long post, I am finishing my large web app and have some dilemma about that: what is good practice? In my backend PHP I am heavily using design patterns and they make my life better, but here, with brand-new javascript technology, I can recognize only few of them - one of first which I learned is singleton - looking at EXT's source code, and private/public javascript methodology, mentioned earlier in this text.
I am expecting your opinions, thanks! greetz, violinista
2. When I close tab in center panel of borderLayout, does it last until I close browser or it frees memory immediately(hope the latter is true)?
3. Good practice of making rich Ext's applications:: if I follow Saki's proposed way (http://extjs.com/forum/showthread.php?t=6564) for private and public methods in javaScript, is good practice for making standaard private methods on old-fashion way, like:
//PRIVATE METHODS:
var makeDocumentsGrid = function(gridContainer) {
//makes and renders grid in provided container
return grid;
}
var makeNewDocumentForm = function(frmContainer) {
//makes and renders form for new document into provided container
return form;
}
var doSubmitOfNewDocumentForm = function(frm) {
//do all the stuff about submitting all document
return response;
}
//....
//INIT - main method - which is public:
init: function() {
makeDocumentsGrid(panel1);
makeNewDocumentForm(panel2);
//etc...
}
You see, I'm asking this twisted question just because I saw across examples in forum that people for all components in their applications make objects and you can see:
var test=new DocumentsForm();So, is the "good practice" making objects and instanting them across the application, or is better to control the components via init public procedure, without too much juggling with objects (except, of course, Ext's objects-they are unavoidable)?
Sorry for long post, I am finishing my large web app and have some dilemma about that: what is good practice? In my backend PHP I am heavily using design patterns and they make my life better, but here, with brand-new javascript technology, I can recognize only few of them - one of first which I learned is singleton - looking at EXT's source code, and private/public javascript methodology, mentioned earlier in this text.
I am expecting your opinions, thanks! greetz, violinista