1. #31
    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


    Always, the silly stuff huh. Be sure to mark your other thread SOLVED, eh ?
    "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.


  2. #32
    Sencha User
    Join Date
    Jan 2008
    Posts
    154
    Vote Rating
    0
    NotChris is on a distinguished road

      0  

    Default


    I am actually going to refer to this thread for the final solution on this. I really do like the trick of dragging the xml file into firefox for syntax checking!! Thanks.

  3. #33
    Ext User
    Join Date
    Oct 2007
    Posts
    38
    Vote Rating
    0
    Makor is on a distinguished road

      0  

    Default


    How add listeners to load method?

    myApp.codeLoader.on({'complete':addUserInfo});
    myApp.codeLoader.load('StaticTextField.js');

    I need to call addUserInfo only once after load? and then listener must be deleted...

  4. #34
    Sencha User
    Join Date
    Jan 2008
    Posts
    154
    Vote Rating
    0
    NotChris is on a distinguished road

      0  

    Default


    Doug,

    I was wondering if it possible to also use this extension and XmlReader to load icons from an XML file? I would think it would but please take a look at the following thread when you get a chance that explains my problem trying to do this:

    http://extjs.com/forum/showthread.ph...l+file%2C+icon

    I did check the syntax this time and it is OK. Thank you.

  5. #35
    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


    Quote Originally Posted by Makor View Post
    How add listeners to load method?

    myApp.codeLoader.on({'complete':addUserInfo});
    myApp.codeLoader.load('StaticTextField.js');

    I need to call addUserInfo only once after load? and then listener must be deleted...
    @makor - I would recommend you set an exception handler as well, in case of problems:
    'complete' fires regardless of exceptions and is designed to signal the end of loading multiple resources, use 'load' instead in your case:
    Code:
    myApp.codeLoader.on({
       load : {fn:addUserInfo, single:true, scope:??? },
       loadexception : alertFailure 
       });
    "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.


  6. #36
    Ext User jerrybrown5's Avatar
    Join Date
    Sep 2007
    Location
    Port St Lucie, FL
    Posts
    185
    Vote Rating
    0
    jerrybrown5 is on a distinguished road

      0  

    Question


    Quote Originally Posted by hendricd View Post
    ext-basex also includes ux.ModuleManager
    ...
    Demo for that coming shortly....
    Doug,
    I am anxious to see a demo of this in action. Two quick questions--

    1) Are you going to address the debugged version of js library files versus the minified ones? (Of course it is too late to flip the ext-all-min vs ext-all but I mean for all of the ones after this.)

    2) Are you going to be able to specify a priority to libraries so that some won't load until after the module is being displayed? (In other words-- put the actual load of a certain priority level and below on a timeout)

    For example if I use Google Maps in my module but not on the first page I would want the gmap js file load to not slow down the module load; however, the gmap load should still not wait until the first map page is trying to get displayed.

    Thanks in advance.

    Best regards,
    Jerry Brown

  7. #37
    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


    @jerrybrown5 -- Here's a taste of what it's all about:

    Code:
    (function(){
    
        //Enable local file access for IE
        Ext.lib.Ajax.forceActiveX = (document.location.protocol == 'file:');
    
        var L = Ext.Loader = new Ext.ux.ModuleManager({
    
            disableCaching:true,
    
            listeners:{
                load :function(manager, module, response, content){
                    //styleSheet handler
                    if(module.extension == 'css'){
                        module.content = content;
                        this.applyStyle(module);
                    }
                },
                loadexception:function(manager, module, ex){
    
                    alert(['Failed to Load Module '+ module.url,'\nError: ',ex.error?ex.error.message:ex]);
                }
            },
    
            depends  : {},  //Holder for the Ext dependency table
    
            getMap:function(moduleName){
    
                moduleName = moduleName.toLowerCase();
    
                var map = this.depends[moduleName.replace("@","")]||false;
    
                //if(!map)return map;  //not a defined Ext module map
    
                map = Ext.apply({path:'',depends:false}, map);
    
                var result = [];
    
                if(map.depends){
                    var c=arguments.callee;
                    forEach(map.depends,function(module){
                        //chain dependencies
                        if(module.substr(0,1)=="@"){
                           result = result.concat( c.call(this,module));
                        }else{
                           result.push(module);
                        }
    
                    },this);
                }
                return result.concat(map.path + moduleName.replace("@",""));
            },
    
            styleAdjust  : {pattern:/url\(\s*\.\.\//ig, replacement:'url(../../resources/'}
    
        });
    
    /* Define our dependency table for Ext 2.0.2 */
    
        //define the site layout for Ext packages (most are already built for you!)
        var p = 'package/';
        var l = p + 'layout/';
        var d = p + 'dragdrop/';
        var w = p + 'widgets/';
        var ux= p + 'ux/';
    
        L.depends = {
        // JS source file   | source location    | Dependencies (in required load order)
          "borderlayout":   {path: l,            depends: [ '@container', l+'containerlayout', p +'splitbar'] }
         ,"button"      :   {path: p+'button/' , depends: [ '@widget-core', '@qtips' ]}
         ,"color-palette":  {path: p ,           depends: [ '@widget-core']}
         ,"container"   :   {path: w,            depends: [ '@widget-core']}
         ,"data"        :   {path: p+'data/',    depends: [  p + 'util'] }
         ,"dataview"    :   {path: w,            depends: [ '@widget-core',p + 'util']}
         ,"date"        :   {path: p        }
         ,"datepicker"  :   {path: p+'datepicker/',
                                                 depends: [ '@menus']}
         ,"dialogs"     :   {path: p+'dialog/' , depends: [ '@window' ]}
         ,"dragdrop"    :   {path: d,            depends: [ '@widget-core']}
         ,"edit-grid"   :   {path: p+'grid/',    depends: [ '@grid', '@form' ]}
         ,"form"        :   {path: p+'form/',    depends: [ '@panel','@dataview']}
         ,"full-grid"   :   {path: p+'grid/',    depends: [ '@grid', '@toolbar','@loadmask' ]}
         ,"grid"        :   {path: p+'grid/',    depends: [ '@dragdrop', '@panel' ,'@data']}
         ,"layouts"     :   {path: l,            depends: [ '@container', l+'containerlayout', p +'splitbar'] }
         ,"loadmask"    :   {path: w }
         ,"menus"       :   {path: p+'menu/',    depends: [ '@widget-core']}
         ,"messagebox"  :   {path: w,            depends: [ '@window']}
         ,"panel"       :   {path: w,            depends: [ '@container', l + 'containerlayout' ]}
         ,"qtips"       :   {path: p+'qtips/',   depends: [ '@panel','@dragdrop' ] }
         ,"resizable"   :   {path: p,            depends: [ '@container']}
         ,"state"       :   {path: p ,           depends: [  p + 'util',] }
         ,"tabs"        :   {path: p+'tabs/',    depends: [ '@layouts', '@panel']}
         ,"toolbar"     :   {path: p+'toolbar/' ,depends: [ '@widget-core', '@button' ]}
         ,"tree"        :   {path: p+'tree/',    depends: [ '@dragdrop', '@form']}
         ,"viewport"    :   {path: l,            depends: [ '@container']}
         ,"widget-core" :   {path: p,            depends: [  p + 'util', "@xtemplate", '@date']}
         ,"window"      :   {path: w,            depends: [ '@dragdrop', '@panel', w + 'windowmanager', w + 'panelDD'] }
         ,"xtemplate"   :   {path: p }
    
         /* optionally define your ux dependencies and locations here */
         ,'miframe'     :   {path: ux ,          depends: [ '@panel'] }
         ,'uxmedia'    :   {path: ux ,          depends: [ '@panel'] }
         ,'uxflash'    :    {path: ux ,          depends: [ '@uxmedia'] }
         ,'uxfusion'    :    {path: ux ,          depends: [ '@uxflash'] }
        };
    
        Ext.require = function(){
            var modules = [],options = {};
            Ext.each(arguments , function(module){
    
              if(module){
                if(typeof module == 'object'){
                   Ext.apply(options,module);
                }else{
                   modules = modules.concat( L.getMap(module) );
                }
              }
    
             });
    
             return L.load.apply(L,[modules,options]);
        };
    
        Ext.provide = L.provides.createDelegate(L);
    })();
    What this means is that you can use the standard Ext-2.0.2/package/* (still have to move a couple of files around) but no custom builds are required unless you prefer it that way. Then, just update the dependency map (see above) to match your Ext distribution/build.

    To prepare for a Fusion Chart, for example:

    Start out lean:
    HTML Code:
     <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
    <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../../ext-core.js"></script>
    <script type="text/javascript" src="ext-basex.js"></script>
    Code:
    Ext.onReady(function(){
        if(Ext.require('viewport', 'uxfusion'){
             var view = new Ext.ViewPort(
                 { region:'center',
                      items:[{xtype:'fusionpanel',....}]
                 } 
                 ....
        }
    });
    then, at your convenience (maybe after page is initialized)
    Code:
    Ext.require('gmap','tree',{async:true});
    All depends on your use-case.
    "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.


  8. #38
    Ext User jerrybrown5's Avatar
    Join Date
    Sep 2007
    Location
    Port St Lucie, FL
    Posts
    185
    Vote Rating
    0
    jerrybrown5 is on a distinguished road

      0  

    Default


    Doug,
    I had no idea that you were using this in an attempt load the ext-all distribution faster. This is a whole lot cooler than I expected. Have you YSlow/firebug performance tested a few samples versus the normal ext-all way yet?

    Since it will only load modules that are required, this should improve the page load time when files can be cached. However, I imagine the speed will be slower when they can not be cached since it will need to download more files from the server than just a single ext-all file. I am anxious to see the raw numbers.

    One other question--since Ext 2 makes it so easy to lazy create components using xtypes [ and layouts with layout types]---would you consider tieing this logic into Ext.ComponentMgr.create[ and Ext.Container.render] (with a mapping of xtypes [and layouts] to requires) to automatically populate the require commands? [layout logic is in brackets]

    Best regards,
    Jerry Brown

  9. #39
    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


    @jerrybrown5 -- The caching issues only comes into play when ux.ModuleManager determines that a given module has not already been loaded (evaled).

    however, I imagine the speed will be slower when they can not be cached since it will need to download more files from the server than just a single ext-all file, but I am anxious to see the numbers.
    Yes, but the goal here is determine how viable the approach is for deploying Ext on more public-facing sites (with minimal "perceived" startup time).

    One other question--since Ext 2 makes it so easy to late create components/layouts---would you consider tieing this logic into Ext.ComponentMgr.create[ and Ext.Container.render] (with a mapping of xtypes [and layouts] to requires) to automatically populate the require commands? [layout logic is in brackets]
    Yes, I've already horsed around with linking with ComponentMgr, but many comps (eg. stores) today don't have xtypes (or even usable ctypes), so the gain would only apply to 'renderable' components and add significant confusion to your scripts.

    I settled on this approach because it permits the implementation to decide how best to arrange functional packages based on the demands of site(layout).

    ux.ModuleManager is just tool, and presented a mechanism for creating your own Ext.require[needs],[provides] capability.
    "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.


  10. #40
    Ext User jerrybrown5's Avatar
    Join Date
    Sep 2007
    Location
    Port St Lucie, FL
    Posts
    185
    Vote Rating
    0
    jerrybrown5 is on a distinguished road

      0  

    Default


    Doug,
    I think you created a great library as is but I think it would take the cake if you did a few relatively minor things.

    -----
    Quote Originally Posted by hendricd View Post
    Yes, I've already horsed around with linking with ComponentMgr, but many comps (eg. stores) today don't have xtypes (or even usable ctypes), so the gain would only apply to 'renderable' components and add significant confusion to your scripts.
    * This will not be for stores for which as you mentioned do not have an xtype. However, you could easily embed a require command around any place where you are creating a new object anyway. The same can not be said when you are using lazy creation with child items.

    * I agree that in one sense it adds confusion by inserting code at the object creation level, but in the other sense it adds simplicity by requiring less implementation code when you use this with lazy creation.

    * This will add a feature at the right place and at the right time. Pages load faster when you lazy create objects which is the same reason of being of this module.

    * The need is there. There are plenty of heavy components such as ones for Flash, TinyMCE and GMaps when you absolutely need to load their dependencies at the right time or else you will greatly slow down your page load time.

    -----
    Couple of other ideas...
    * Your sample did not include the module eval logic that it looks like you are building into it. This would be especially useful on the TinyMCE xtype that is available on the forum.
    * Is it possible that you can allow a ~ prefix to automatically load a module asynch (or on a timeout)
    * (from earlier) Are you going to address the debugged version of js library files versus the minified ones? Ideally, there would be a global tag that would be checked.

    Thanks in advance.

    Best regards,
    Jerry Brown

Thread Participants: 82

  1. galdaka (1 Post)
  2. Digital God (3 Posts)
  3. prophet (1 Post)
  4. alayasf (2 Posts)
  5. tof (1 Post)
  6. stever (3 Posts)
  7. mystix (4 Posts)
  8. fangzhouxing (6 Posts)
  9. ludoo (1 Post)
  10. KRavEN (4 Posts)
  11. DigitalSkyline (3 Posts)
  12. daemach (1 Post)
  13. violinista (1 Post)
  14. mlarese (1 Post)
  15. walker_cn (4 Posts)
  16. stevebla (4 Posts)
  17. Chris in Cambridge (1 Post)
  18. mjlecomte (2 Posts)
  19. ZooKeeper (10 Posts)
  20. brookd (1 Post)
  21. fermo111 (6 Posts)
  22. kevinwu8 (1 Post)
  23. Spirit (3 Posts)
  24. jerrybrown5 (4 Posts)
  25. lvanderree (8 Posts)
  26. Makor (4 Posts)
  27. yanick (1 Post)
  28. wm003 (10 Posts)
  29. radio1 (3 Posts)
  30. jphillips (2 Posts)
  31. markpele (2 Posts)
  32. Romantik (1 Post)
  33. Sander_S (4 Posts)
  34. maximumcoder (2 Posts)
  35. NotChris (6 Posts)
  36. ritchrs (2 Posts)
  37. sksoft (2 Posts)
  38. jvanantwerp (2 Posts)
  39. jfa (2 Posts)
  40. BlueCamel (1 Post)
  41. ClemsonJeeper (3 Posts)
  42. sp797 (1 Post)
  43. mahesh122 (2 Posts)
  44. zombeerose (12 Posts)
  45. jlowe (2 Posts)
  46. bt_bruno (2 Posts)
  47. pompom (4 Posts)
  48. Eric24 (18 Posts)
  49. baumschule (3 Posts)
  50. coderobo (3 Posts)
  51. krause (1 Post)
  52. mubenchi (1 Post)
  53. mrkadakia (3 Posts)
  54. tomim (4 Posts)
  55. canxss (2 Posts)
  56. tasman (3 Posts)
  57. mrsunshine (4 Posts)
  58. Trinad (2 Posts)
  59. jasonb885 (2 Posts)
  60. wki01 (5 Posts)
  61. mschwartz (2 Posts)
  62. sarathy (2 Posts)
  63. jdurante (1 Post)
  64. TomChiverton (1 Post)
  65. sumit.madan (2 Posts)
  66. Riemi (4 Posts)
  67. Henrik Rutzou (3 Posts)
  68. hairinwind (1 Post)
  69. gzlizp (1 Post)
  70. yuanqixun (2 Posts)
  71. larryaubstore (2 Posts)
  72. wupeng (2 Posts)
  73. blueram (1 Post)
  74. ronivcp (1 Post)
  75. t00bs (2 Posts)
  76. hyponym (4 Posts)
  77. mg2468 (3 Posts)
  78. scaddenp (1 Post)
  79. faith wins (3 Posts)
  80. aratcliffe (8 Posts)
  81. jhashe (3 Posts)
  82. jaufgang (1 Post)

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar