ExtJS Getting Started

公司的IM用的ExtJS,我自己写的用的jQuery,所以又得学习了,当然,相似之处肯定是有的,比如Ext.onReady()和$(document).ready()感觉就是差不多的东西,还有都得熟悉一下选择器...还是先入门一下吧...

http://www.sencha.com/products/extjs/

吐槽一下...为什么官网打开速度这么慢@@!

Getting Started

要点:

1. 最好使用Web服务器来解决XHR的跨域问题,正好机子上配了XAMPP,可以直接用

2. 将下载的SDK解压(假设命名为extjs),放入XAMPP安装目录的htdocs文件夹内,例如:D:\xampp\htdocs\extjs

目录中内容(ext-4.1.1a-gpl):

启动服务器,访问 http://localhost/extjs/index.html 就可以打开欢迎页了

这时就可以直接看本地的文档,不用抱怨吭爹的网速了...(很关键,在本地查看文档速度很快)

3. 应用程序结构

官方推荐的Ext JS应用程序目录结构:

- appname
    - app
        - namespace
            - Class1.js
            - Class2.js
            - ...
    - extjs —— 下载的SDK文件
    - resources
        - css
        - images
        - ...
    - app.js
    - index.html

创建第一个Demo,还是在"D:\xampp\htdocs\"目录下创建文件夹helloext,放入SDK(extjs文件夹),其它文件根据官方教程创建即可,运行结果如下:

动态装载部分Chrome给出的提示和它说的不大一样:

添加Ext.require()后就没有这个提示了

4. 关于引用哪个库

  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.

5. 最后一部分部署的暂时不想了解...

6. 正如学习jQuery从$(doucument).ready(function () { });开始,ExtJS由Ext.onReady(function () { });开始

接下去就是需要啥查啥了...

几个月的成果被否定了- -|||||Nevermind...继续学习

转载于:https://my.oschina.net/zoey1990/blog/88179

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值