ExtJs4 Learning (1): Get to know ExtJs4 and get to know extjs4

Source: Internet
Author: User

ExtJs4 Learning (1): Get to know ExtJs4 and get to know extjs4

Understanding ExtJs

1. Can I use ExtJs for Javat?

It is a display layer technology related to JS, HTML, and CSS. It has nothing to do with whether the server is. Net or PHP.


2. What types of projects is ExtJs suitable?

According to the official saying, ExtJs is designed for you as a B/S desktop application and is not suitable for portal websites. I personally understand that ExtJs is suitable for information management systems (MIS) that require a large number of complex interface la S and interactions ).


3. ExtJs is not efficient. It's so slow ...?

Indeed, the complex layout and interaction pages of ExtJs are very slow in IE6, 7, and 8, and not ideal in IE9, but in Chrome, fireFox and other new-generation browsers run very quickly. I dare say that in the same complex page layout and interaction, it is definitely several times better than the third-party server control you use Asp. Net. So in the current situation, you have to strongly recommend that your customers use browsers such as Chrome to run your system. For information management systems generally used in internal LAN, such requirements are not sufficient.


4. Why is ExtJs efficiency?

In the B/S program, the efficiency bottleneck of the presentation layer lies in three aspects: the speed of the browser's interpretation of Js, the rendering speed of HTML DOM, memory release, and network bandwidth. These problems have been solved to some extent after multiple ExtJS version optimizations. In particular, the problem of a huge JS library that has been criticized for more than 1 MB in the past has been perfectly solved under the new on-Demand Loading Mechanism of ExtJS4. Other problems are often related to specific browsers and cannot be solved by Ext. As a matter of fact, in Chrome browser, the system response speed we use ExtJS is approaching the point where it is terrible .... if you want to implement the same complex interface layout and interaction, I cannot find a technology that can solve the problem faster than ExtJS.

 

5. Do I need to write a lot of JS Code to use ExtJS, which will make the system difficult to develop, debug, and maintain?

Compared with Asp.net programmers who are used to simple drag controls, ExtJs requires you to have more basic knowledge. However, we acknowledge that many of the requirements are not solved by the drag and drop controls. If you want to create an application that is truly ready to use, you have to make more efforts, next we will explain how to learn, develop, and debug ExtJs correctly. Therefore, technical teams with poor technical skills are not suitable for ExtJs. using powerful third-party server controls such as DevExpress and Telerik may be your preferred choice. Just as there are many hard-to-maintain C # projects, you can only blame yourself for spam. Just like playing LOL, there is no spam occupation, only spam players ....

 

6. Is it worthwhile for companies, technical teams, and individuals to invest in ExtJs learning costs?

Objectively speaking, what you invest is the learning cost of Javascript, and ExtJs itself does not have much you need to invest. Unless you think it is very difficult to read an English API. The investment in Javascript is definitely worth the investment from the current technological development trend... unfortunately, most of the domestic Asp.. Net programmers are still at the level of CIDR block effects from the Internet...

 

7. The ExtJs interface looks the same, aesthetic fatigue...

No one has prevented you from modifying the ExtJs interface... in fact, there are a lot of applications using ExtJs outside of China. You can't tell me what ExtJs is doing. In addition, sass is supported in ExtJs4, which can easily change the skin and style of ExtJS.

 

8. Why ExtJs?

Excellent UI interaction capabilities and powerful UI components are designed for the information management system;

The provided skin style and mature layout reduce the investment of the artist to a certain extent;

The documentation is very complete and easy to use;

Over the years, in the 4th major version, there have been a wealth of technical discussions in both success stories and communities, so you can easily find your own problems;

Open-source and well-oriented object structure allow you to easily expand and rewrite ExtJs, implement the functions you want, and encapsulate them into your own components based on your project needs;

The compatibility of multiple browsers is very good. It can run perfectly in all popular browsers without any modifications;

Javascript + HTML (5) as the mainstream technology for WebUI development, it is now very clear that ExtJs is a great development form;

From the ExtJs version upgrade in recent years, we can see that the ExtJs development team is extremely responsible and awesome;


Summary: for the application of development technology, only the choice of garbage and the application of garbage, no garbage technology.A one-sided evaluation of a technology without preconditions is impetuous.Is stupid...



I am getting started with extjs. I am now learning how to use Extjs4. I would like to ask how extjs receives and parses json data.

JSON can be understood as a serialized string of JavaScript objects. After reading the JSON content, you will find that the object literal volume written in the Code is basically the same, therefore, you can use the eval method to convert JSON to an object.
Ext is just a simple eval encapsulation method to adapt to different standard JSON
Source code:
Ext. util. JSON. decode = function (json ){
Return eval ('+ json + ')');
};
You can see it by alert.

// Example
Ext. onReady (function (){
Ext. Ajax. request ({
Url: 'getmsg. action? User = 1 ',
Method: 'get ',
Success: function (resp, options ){
// Standard JSON string '{"data": [{"msg": "abcd"}]}'
Var jsonObj = Ext. util. JSON. decode (resp. responseText );
// Display the modal prompt box
Ext. Msg. alert ('title', jsonObj. data [0]. msg, function (btn ){
// Ext's modal window is very important because it only shields operations, does not block threads, and js does not have threads.
// Callback of the button event in the prompt box
Alert (btn); // then run
});
Alert (1); // execute first
}
// Failure: function () {...} // optional
});
});

Ext's ApiDoc is very good at learning. Do not read some so-called Chinese versions. There are many machine translations, and many unproofread errors.

In addition, to learn ExtJS, We need to master the concept of closure. This is a very important feature of js. Ext uses this feature to simulate inheritance and encapsulation, and to some extent implements object-oriented programming. of course, you can also ignore the Ext Inheritance Mechanism and use prototype of js itself)

Turn: How do beginners learn ExtJS 4

Recently, I was deeply touched by the ExtJS Communication Group. As a veteran, I feel that it is necessary to introduce how to learn this basic problem. How do beginners learn ExtJS4? How to get started with ExtJS4? How to quickly learn ExtJS4? 1. read the new tutorials carefully. The new tutorials refer to the articles Guides in ExtJS official documents. Because they are in English, they may be difficult to read. Therefore, I have specially translated these tutorials, according to the usage frequency, I have translated the most commonly used tutorials and will continue to translate them later.
After reading this series of tutorials, you will have a framework understanding of the basic usage of ExtJS, And you will generally know how to implement common functions. Now I will list all the translated tutorials here. Remember, it will be helpful to read carefully. ExtJS 4 entry ExtJS 4 Class System Introduction ExtJS MVC Architecture introduction ExtJS 4 Layout and container ExtJS 4 component details ExtJS 4 data (Package) extJS 4 Grids ExtJS 4 forms ExtJS 4 tree 2. you can view all the demos in the official document to understand what functions are implemented in the official Demo. When you want to create a function, some examples are the fastest, when you browse the Demo, you will have a rough impression on the existing Demo. When you have no clue, your brain will look for the previous impressions in the background and carefully browse it. 3. familiar with API Docs (API documentation) recently, many people have asked questions and pasted a piece of code that they took for granted to ask why it was wrong. In fact, you can check the API documentation carefully, extJS does not support this usage. Of course not.
The advantage of searching is that it can quickly solve some clusive problems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.