13 Dec 2007 5:50 AM #11
How could this slow down the dev process (as in Development Process)? Do you mean slowing down the loading of the pages?
How do you load the js on demand?
You can see my load js on demand code here(extracted from my project):
13 Dec 2007 6:04 AM #12
I think you could use both approaches. Load everything on production and lazy loading during development.
19 Dec 2007 12:25 AM #13
An I forgot to mention the fact that dynamically loaded code is almost impossible to debug with Firebug. That may be the main reason to load everything in advance
19 Dec 2007 4:53 AM #14
@fermo111: I'm using "dynamic" code myself during the learning process, and while it might be newbie overkill on my part, I'm able to debug the code. My layout sounds somewhat similar to yours. I have a bunch of left-nav links, and on the click event of a link, I load a new tab in the center region of a BorderLayout. The tab's contents are autoLoad[ed] from an HTML file that contains a content fragment and the content-specific JS. Overkill part: I debug the dynamic code by first making the fragment a complete HTML page with all the required Ext include files. I get the page running by itself, then strip out all the unecessary stuff before using it in my main page.
You can see here, go to Inventory >> Update Physical
I'm curious about one of your previous posts in this thread where you mention, "I have a tree on the left region to be used as a menu. The tree is built based on a JSON object. Each node has some configuration info to be used to decide what to do when the user clicks it (actually is a key to index a configuration structure). The normal behaviour in response to a tree click is adding a tab to the center region and loading an HTML fragment into it."
19 Dec 2007 6:09 AM #15
@Ephicient: there is a well known problem with Firebug that prevents it to debug code loaded with eval(). It is in the wish list at the firebug site.
About your question: I am ashamed to show my code, but I'll see what I can do
19 Dec 2007 7:21 AM #16
- Join Date
- Aug 2007
- Long Island, NY USA
- Vote Rating