1. #11
    Sencha User fangzhouxing's Avatar
    Join Date
    Mar 2007
    Posts
    466
    Vote Rating
    1
    fangzhouxing is on a distinguished road

      0  

    Default


    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?
    In dev time, when you find a bug, you must refresh the page to reload the new js file. If you load all js in start time, then you waste many time in reloading.

    You can see my load js on demand code here(extracted from my project):
    http://extjs.com/forum/showthread.php?p=92714#post92714

  2. #12
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    I think you could use both approaches. Load everything on production and lazy loading during development.

  3. #13
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    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

  4. #14
    Ext User
    Join Date
    Nov 2007
    Posts
    42
    Vote Rating
    0
    Ephicient is on a distinguished road

      0  

    Default


    @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
    http://www.ephicient.com/ext/examples/layout/

    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."

    I'm very intersted in how you're using the tree-nav with configuration to load the html fragment and related javascript classes. Do you have a sample of this?

  5. #15
    Sencha User
    Join Date
    Jul 2007
    Location
    Italy
    Posts
    134
    Vote Rating
    0
    fermo111 is on a distinguished road

      0  

    Default


    @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

    Bye

    Luca

  6. #16
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Default


    I'm very intersted in how you're using the tree-nav with configuration to load the html fragment and related javascript classes. Do you have a sample of this?
    @Ephicient - See if this thread generates some ideas.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.