Unknowingly have come to an end in 2008, and in this the last year, has been trying to use the ExtJS to do projects, from 1.1 to 2.2 now, eating a lot of hardship, there are a lot of harvesting, to sum up, to share!

1. ExtJS is the positioning of RIA, and Prototype, jQuery, such as the positioning of a different class library. The development of the use of ExtJS so that means that the development of a client-oriented, or not told RIA framework, and Prototype, jQuery, such as only supporting client framework, and ExtJS not start first on the same. If we must, and compared the framework of other words, it should be and the Isomorphic SmartClient, Backbase Enterprise Ajax framework like the comparison, of course, and they are compared, ExtJS is a great advantage.

2. ExtJS when using the services need to address how the issue of client communications. Because only a ExtJS framework for client and server technology does not matter, there is no corresponding end of the service adaptation layer, so if the client to use ExtJS, you must provide the data structure it needs. ExtJS this in several ways, primarily through client communication and service:

* Ext.Ajax.request so common asynchronous request, the server can return in accordance with the actual situation in the form of JSON or HTML fragment data;
* Ext.tree.TreeLoader tree structure is loaded, service client must return to the form of JSON data, but also to meet the configuration requirements of Ext.tree.TreeNode Otherwise, do the conversion;
* Ext.data.Store and the derived class to load the data in tabular form, service client can return to the actual situation in the form of JSON or XML data format data, in the absence of special requirements, recommended the return of the JSON data format;
* Ext.Element.update local update, this method is to call the most total Ext.Ajax.request method, because it is listed separately because this way is easier to be ignored, but still, in some cases, quite by For example, call Ext.Panel.body.update () on a local Ext.Panel update the content, if you use this method, then the server can only return to the corresponding fragment of HTML;

3. ExtJS using Notes. ExtJS and other supporting libraries (Prototype, jQuery, etc.) is very large compared to so many, many discourage beginners. After nearly a year and used, for the use of ExtJS, I summed up a few pay attention to what matters:

* ExtJS to make full use of dialect. ExtJS provides a lot of useful ways to deal with common client-side JavaScript development tasks, common inquiries HTMLDom, the creation of HTML elements, HTML elements for the registration of the incident response function, which can all use ExtJS to provide ways in which their own Construction and ExtJS code above, a few examples:
o Query ID of the DIV for the container of all the checkbox, you can use: Ext.fly ( 'container'). select ( 'input [type = checkbox]');
o in the ID for the DIV inside the container to create a button, you can use: Ext.fly ( 'container'). createChild ((tag: 'input', type: 'button'));
o for the ID of the DIV for the container of the click event handler registration, use: Ext.fly ( 'container'). on ( 'click', handlerFn, scope);
* ExtJS custom events very well, and can achieve one-to-many notification, and any custom event can be half-way stop, as long as there is a processing function to return false.
* Store a file into a display data using ExtJS, naturally Ext.data.Store needed and its derived classes, you can take into account all of the Store into a file, it would be very helpful to reuse.
* Script file management module as far as possible into each class, a type of a file, similar to Java or C # with the document processing method, each file indicate its role, relying on the documents, if the case could be considered too much to write a configuration file, by reading the configuration file to the output script to the client.
* Debugging and deployment of the respective load Debug and Release versions of the script attached to ExtJS examples do not use the Debug version of the example of integrity, a lot of people can not find the Debug version of a complete reference sequence, through the Source folder ext.jsb analysis of documents, you can load the correct order, as follows:
o Debug
1. / Ext-path/source/core/ext.js
2. / Ext-path/source/adapter/ext-base.js
3. / Ext-path/ext-all-debug.js
o Release
1. / Ext-path/adapter/ext/ext-base.js
2. / Ext-path/ext-all.js
* Script to compression of the project in a large number of JavaScript, then compressed it is necessary, I recommend that the ExtJS Forum JS Builder, can configuration files to be compressed Script and CSS, it is said ExtJS is compressed using this tool, but there is a drawback, and that is does not support UTF-8 encoding.

4. ExtJS sum up the advantages and disadvantages. After nearly a year to try, ExtJS summarize the advantages and disadvantages are as follows:

* Advantages of
o the same class in the 1.1 version that was not perfect, but after 2.0 the, ExtJS after internal earth-shaking changes, especially the UI components, a unified base class, giving us the feeling like a run in the browser's run-time framework, which could only be skilled in the ExtJS experience before.
o Hosted a page in the development of ExtJS to 2.0 after the library is not only consistent UI, and rendering a unified way, with an official as saying that the Managed Rendering, which allows the expansion of UI more consistent and is conducive to future maintenance and发展.
o the relative wealth of documentation and examples There is no doubt that ExtJS has just come into contact with the majority of people have been examples of it attached to the document to attract and develop the past, its done really good documentation.
o gorgeous interface and mature after ExtJS 2.0 interface really did not have to say, not only gorgeous, but is relatively mature.
* Shortcomings
o there is no suitable tool for the development there is no doubt that a good development tools can greatly improve the speed of encoding, but ExtJS, has not been a perfect development tool, you can recommend with Aptana Studio, Spket IDE, and provides tips Spket documents, but have their own advantages and disadvantages are not perfect, only one side while watching the SDK to write code.
o Although there is no interface design tool was to provide an online interface design tool, but Visual Studio and ASP.Net design tool available for really can be said to be different. Therefore, one can only preview, while writing code.
o Although the ExtJS documentation provided incomplete documentation is very rich, but still can not keep up the source code to update speed, so often to see the source code to be adopted, debugging can really solve the problem.
o can not compile it can be said that the shortcomings of JavaScript (if the compiler is not called JavaScript), and in the actual development, often knocking on the wrong code, such as an error, such as case, the compiler can not get feedback, only debugging at run time, leading to the development of relatively low efficiency.

5. ExtJS do use some of the recommendations of the application. Most people think that a large volume of ExtJS script, on the Internet is not suitable for this, the following recommendations:

1. The deployment of Web applications on the Internet must be loaded Release version of ExtJS
2. Can be considered only necessary components to load, build directory script files are compressed, if the project ExtJS components used are not many, can be used only to load
3. Consider the use of file compression functions IIS
4. The use of Google's Gears, to do all the static files cache client
5. The use of ADOBE's AIR, the package to the client script to run

In general, ExtJS is a good framework, it is accompanied by wonderful, I gone through 2008 and perhaps 2009 in the future, I will turn to other RIA technologies, but I will continue to monitor at least ExtJS, but also hope that this framework can tenacity to survive.
Reproduced in the source: http://www.cnblogs.com/beginor/archive/2008/12/14/1354922.html