Almost graduated. I recently attended an interview. During the interview, the examiner asked me to complete an Ajax user management system including the front-end and back-end in an hour and a half, since I have been practicing using JavaScript to directly perform Ajax-related operations before, I have not looked at the JS frameworks on the market, and I have forgotten a lot of data access methods because I recently learned about WCF, the final result can be imagined. So when I came back, I took the time to learn about the existing framework. It is recommended that students who want to participate in the on-board interview should familiarize themselves with these frameworks and do not lose the opportunity like me. The following are some of the problems and solutions I have encountered in learning ExtJS over the past two days. I hope to help people who have just started learning ExtJS like me.
1. At least what files in the SDK need to be included in the project?
Entire resources folder
Ext-all.js
Adapter/ext/ext-base.js (the version I downloaded is 3.0.3)
2. How to Make ExtJS run in a browser?
One CSS file, two JavaScript files, and one attribute setting (note the sequence introduced by JS files)
<! -- ExtJSPath is the ExtJS folder path -->
<! -- The ext-all.css controls the display of the Ext part. If the display of the part needs to be changed, you can introduce an overloaded CSS file after this file -->
<Link rel = "stylesheet" type = "text/css" href = "extjspath/ resources/css/ext-all.css"/>
<! -- Ext-base.js is the Ext "Adapter", this file provides the core functions of Ext, we can also use other JS library -->
<Script type = "text/javascript" language = "javascript" src = "ExtJSPath/adapter/ext/ext-base.js"> </script>
<! -- Ext-all-debug.js/ext-all.js contains all controls -->
<Script type = "text/javascript" language = "javascript" src = "ExtJSPath/ext-all-debug.js"> </script>
<! -- Set the Ext. BLANK_IMAGE_URL attribute -->
<Script type = "text/javascript" language = "javascript">
Ext. BLANK_IMAGE_URL = "ExtJSPath/resources/images/default/s.gif ";
</Script>
3. How to use a non-ExtJS adapter?
The solution to this problem is actually provided in the javasde_order.txt file of the SDK.
The following lists the order in which JavaScript files are referenced by mainstream frameworks:
Yahoo! UI (. 12 +)
-------------------------------------------------------------------
Yui-utilities.js
Ext-yui-adapter.js
Ext-all.js (or your choice of files)
JQuery (1.1 +)
-------------------------------------------------------------------
Jquery. js
Ext-jquery-adapter.js
Ext-all.js (or your choice of files)
Prototype (1.5 +)/Scriptaculous (1.7 +)
-------------------------------------------------------------------
Prototype. js
Scriptaculous. js? Load = effects (or whatever you want to load)
Ext-prototype-adapter.js
Ext-all.js (or your choice of files)
4. If the network is disconnected, a problem is displayed!
Cause: the s.gif image is not found. This image is an important component of the UI part of the ExtJS framework and is used to create items such as icons. By default, the Ext. BLANK_IMAGE_URL attribute points to http://extjs.com/s.gif.
Solution: Set Ext. BLANK_IMAGE_URL to "ExtJSPath/resources/images/default/s.gif ". As shown in the code above.
5. The fonts in IE and FF are different!
Cause: ExtJS uses 11px in many cases. For 11px, different browsers render it differently. The rendering of IE is similar to that of 12px, while that of FF is similar to that of 10px.
Solution: replace all 11px after font or font-size in resources/css/ext-all.css with 12px.
6. the API cannot be viewed!
Cause: Ajax is required for API access.
Solution: deploy the SDK folder on the server.