Seven Sins of AJAX

Source: Internet
Author: User
Tags javascript array

Introduction

A New Approach to Web Applications in 2005.2.18Jesse James Garnett introduces A New term in the AJAX web field. The birth of the new darling is closely related to the famous football teams Ajax, Google Suggestc, and Google Maps. However, it seems that people have a high expectation for AJAX, and some people even propose to use AJAX to replace Java Applet and Flash. I don't know if I have heard such a call before I switched my Flash UI to Javascript. AJAX is a great thing. It is a standard created without creating new technologies. With this, it can attract a large number of enthusiastic followers, AJAX seems to be more like Yang Guo and Xiaolong female, who have been trained by Yu female, but it has no destructive power to separate them, but the combination of the two is extremely powerful.

SIN 1: poor support for search engines

This is actually more like a big irony. The originator of AJAX is Google, but it is the worst for Google's support, there is no link between Top and Bottom on the GMail main interface, which is the most ironic. Although Mail itself is a private application system, this connectionless design interface just opens a bad header for AJAX. Flash has the same problem. A web without link is like a lost lamb in the forest. This seemingly advertisement is actually the fundamental principle of web design.

Sin 2: complicated and error-prone Compilation

Javascript is a lightweight little thing, and it is now forced to be reused. Javascript has little support for OOP, which limits the reusability and encapsulation of javascript code. From Google Mpa or some other applications, there are countless such files, in addition to making programmers dizzy faster, there is no benefit at all. What's even more terrible is that javascript does not have a handy Debug software. Many javascript writers still use the original alert ("") debugging splinetech JavaScript HTML Debugger is a Debugger that looks like it is not free of charge. Dozens of knives make me a poor man who can only look and sigh.

Sin 3: more redundant code

Similar to the above, the layer-by-layer inclusion of js files is a common problem of AJAX. In addition, many of the previous server-side code is now put on the client, therefore, each time you open a page, a lot of useless js files will be downloaded together. Although broadband is becoming more and more popular, reducing code redundancy is a required course for every web designer.

Sin 4: undermining the original Web standards

What is destroying web standards?Click to view all, which breaks the web standard. Well, there is no need to put the tag. span is needed. There are many examples of this type. You can change the title after clicking on the title in flickr. This includes me.) It is a convenient design that everyone agrees to, but it also does not clarify the meaning of the web element, is it inappropriate for a word that is not known to be used?

Sin 5: lack of a browser with no standards or back or history

Haha, this sentence is ironic. The current browser market, such as IE, FireFox, and Opera. The difference between the browser and the browser has always been a pain point for web designers. Different css is supported, and different client scripts are supported. Some even have different client scripts. This makes programmers very worried. The most obvious thing is to call xmlhttprequest, req = (window. XMLHttpRequest )? New XMLHttpRequest (): new ActiveXObject ("Microsoft. XMLHTTP"); the code used to create an xmlhttp object is a classic example of a browser that adapts to the IE and non-IE camps. It is also ironic to say that there is no back or history browser. It mainly means that clicking a link under AJAX does not Redirect the page, so there is no backward and forward. Similarly, if you do not move backwards or forward, you will not find any browsing history. The root cause of back and history is the url change. In AJAX, people find that without modifying the url, the content can also change this cool feature. Why not? Look done.

Sin 6: XML is just used to crack the blind

Xml has been consistently favored since its birth. It is a big trend for non-xml users. I think Jesse James Garret forced xml to be added to ajax in order to become popular. Xml has a fatal drawback, that is, the resource consumption for loading, which seems to be a common fault in xml on all platforms. Although google map is the AJAX brand spokesperson recommended by Jesse James Garnett, gmap does not use xml, but uses a native javascript array, I never use XML when I use AJAX to return data from the server, because it makes me more complicated and slows down the system. The server first needs to call xml to encapsulate the data to be transmitted. After the client obtains the data, it will call xml for parsing. An important feature of AJAX is its lightness and simplicity. Data Transmission should be as simple and simple as possible. If a large amount of complex data needs to be transmitted, it should also be returned through multiple calls.

Sin 7: The world is so big that it cannot find its own home

What does AJAX apply? What can we do? What can it bring? It is a joke to use AJAX on a website. Except for websites in specialized fields such as Google Map and Flickr, this technology is not necessary for normal websites; it is estimated that AJAX can be used in a huge enterprise application market. However, MS and SUN won't look at AJAX, a wild child, to spread the game on their website. If AJAX is used, who should I sell java ?. Net to whom to sell? Therefore, AJAX is not a permanent place for enterprise applications. Therefore, AJAX cannot find its proper position. This is an example of a suspicious case. Recently, AJAX is directed at Flash and Applet.

Of course, I am not trying to make AJAX useless. I personally like this technology very much. It can make web designers more eye-catching and make some bold designs a reality, but I will also be very calm and careful to use this tool. Although it is good, I will not be careful about myself.

Note: self-built http://www.duduwolf.com/post/115.asp

(

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.