<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 8, comments - 0, trackbacks - 0, articles - 11

    ExtJS4 -- 動態加載

    Posted on 2012-04-06 13:25 a_alter 閱讀(768) 評論(0)  編輯  收藏 所屬分類: ExtJs

     ExtJS4  新特性

    • Ext.define to create class definitions within the new system
    • Automatic dependency management and dynamic class loading
    • Mixins
    • Statics
    • New config option for Automatic setter / getter generation

    Library Inclusion methods

    When you unzip the Ext JS 4 download, you will see the following files:

    1. ext-debug.js - This file is only for use during development. It provides the minimum number of core Ext JS classes needed to get up and running. Any additional classes should be dynamically loaded as separate files as demonstrated above.

    2. ext.js - same as ext-debug.js but minified for use in production. Meant to be used in combination with your application's app-all.js file. (see section 3)

    3. ext-all-debug.js - This file contains the entire Ext JS library. This can be helpful for shortening your initial learning curve, however ext-debug.js is preferred in most cases for actual application development.

    4. ext-all.js - This is a minified version of ext-all-debug.js that can be used in production environments, however, it is not recommended since most applications will not make use of all the classes that it contains. Instead it is recommended that you create a custom build for your production environment as described in section 3.

    了解不同js的使用定位

    Class Loading

    Ext 4 now includes a robust dynamic class loading system that also provides integrated dependency management. Again, this is an optional feature, but provides a couple of key benefits:

    • Dynamic loading: Classes can be loaded dynamically and asynchronously at runtime simply based on the dependency tree that Ext manages internally. This means that you can stop managing brittle blocks of manual include tags in HTML pages and simply let the class loader figure out what your page needs to run. This is mostly useful in the development environment when dependency flexibility is more important than page load speed.

    • Dynamic build generation: For production, it's usually preferable still to compile down to a single (or few) build files. Since Ext now understands the entire dependency graph at runtime, it can easily output that graph as needed (for example, in the form of a custom build configuration). And even more importantly, this capability is not restricted to the Ext namespace. You can include any number of custom classes and namespaces in addition to Ext and as long as everything is defined using the class system Ext will be able to figure out how they all relate. In the very near future, any Ext developer will have one-click custom build capability that automatically manages the entire Ext + custom application class graph, even as it changes from one minute to the next, and only builds exactly what's actually needed by the app.

    This dynamic loading is enabled simply by using Ext.define and by defining the dependencies in code using two new class properties:

    • requires: The class dependencies required for a class to work. These are guaranteed to be loaded prior to the current class being instantiated.
    • uses: Optional class dependencies that are used by, but not required by, a class. These can be loaded asynchronously and do not have to be available for the class to be instantiated.

    第一種方式

            Ext.require([
                
    'Ext.grid.*',
                
    'Ext.data.*',
                
    'Ext.util.*',
          
      ]);

     

    第二種方式

    Ext.define('Ext.window.Window', {
        extend: 
    'Ext.panel.Panel',

        alternateClassName: 
    'Ext.Window',

        requires: [
    'Ext.util.ComponentDragger''Ext.util.Region''Ext.EventManager'],



    });


     




     

    主站蜘蛛池模板: 亚洲精品国产精品乱码不卞 | 亚洲?v无码国产在丝袜线观看| 亚洲宅男天堂a在线| 久久青草91免费观看| 亚洲AV午夜福利精品一区二区 | 亚洲一区二区三区自拍公司| 人妻仑乱A级毛片免费看| 亚洲精品456播放| 精品国产污污免费网站入口| 日韩精品亚洲aⅴ在线影院| xxxxxx日本处大片免费看 | 久久精品国产亚洲av麻豆小说 | 99久久精品免费精品国产| 久久国产精品亚洲综合| 3d成人免费动漫在线观看| 亚洲成无码人在线观看| 毛片a级毛片免费播放下载| 亚洲欧美成aⅴ人在线观看| 国产一级淫片视频免费看| 一级免费黄色大片| 亚洲AV成人片色在线观看| 亚洲啪啪免费视频| 亚洲av永久无码精品网址| 亚洲日韩VA无码中文字幕| 99热在线免费观看| 国产成人亚洲综合一区| 亚洲AV无码成人精品区大在线| 久久久久女教师免费一区| 亚洲尹人香蕉网在线视颅| 好爽又高潮了毛片免费下载| 黄色毛片免费在线观看| 亚洲伊人tv综合网色| 在线jlzzjlzz免费播放| 国产成人高清精品免费观看| 91情国产l精品国产亚洲区| 日本xxwwxxww在线视频免费| a级成人毛片免费图片| 亚洲色欲色欲www在线播放| 亚洲中文字幕久久精品无码APP| xxxxx免费视频| 日韩在线观看免费完整版视频|