Seven Deadly Sins of Ajax

Source: Internet
Author: User
Tags interface sin client
Ajax

Introduction

A New approach to Web applications from James Garrett of 2005.2.18,jesse the AJAX web world. Coupled with the birth of a new darling in the football team Ajax, Google suggest Google Maps these celebrities are closely related, do not want to be famous is difficult ah. But it seems that people are getting a little too high on Ajax, and some have even proposed replacing Java applets and Flash with Ajax. I don't know if Flickr has heard this kind of calls to turn its flash UI into normal JavaScript. Ajax is a great thing, it is not the creation of new technologies under the premise of the birth of a standard, with this can attract a large number of followers, Ajax looks more like Yang and little Dragon Girls practiced the Susan Sword, separate to do nothing destructive, but the combination of the two is very powerful.

One of the sins: poor support for search engines

This is actually more like a big irony, the originator of Ajax is Google, but Google itself to support the most bad, Gmail main interface in addition to top and bottom outside a link is the most image of the irony. Although Mail itself is a private application system, the no-link design interface is just a bad start for Ajax. Flash also has this problem. A web without links is like a lost lamb in the forest, which seems to be the basic principle of web design.

The second sin: writing complex, error-prone

JavaScript is a lightweight little thing that is now being forced to be reused and affordable. JavaScript has very little support for OOP, which limits the reusable encapsulation of JavaScript code, and so on, from Google MPa or some other application, you can see countless <script src= "..." ></script > files such as these include a little bit of benefit in addition to making programmers dizzy faster. Even more frightening is in the JavaScript does not even have a handy debug software, many of the veteran to write JS to today or with the most original alert ("") to debug, Splinetech JavaScript HTML Debugger is a kind of look like a debugger bar, but not free, dozens of broadsword let me the poor can only hope and sigh.

Sin III: Redundant code more.

And above said almost, layer contains JS file is the common problem of Ajax, plus a lot of the previous server code is now put to the client, so each open a page will contain a lot of useless JS files are also downloaded together. While broadband is gaining popularity, reducing code redundancy is a required course for every web designer.

Sin IV: Destroying the original standards of the Web

What do you mean by breaking Web standards? This is the destruction of web standards. A good label for a will not be used, but it must be in span. This is a lot of examples, Flickr in the title Click can be changed, although (also including me) is the unanimous applause feel convenient design, but at the same time this is ambiguous the meaning of the web element itself, the word is not known to use the right to fit?

Sin V: lack of a browser without standards, without back and history

Haha, this word is a bit ironic. Now the browser market, whether it is IE or Firefox or opera and so on. The difference between browsers and browsers has always been the pain of the web designer's heart forever, supporting the CSS is not the same, supporting the client script is not the same, and some even the use of client script is different. This makes the programmer very distressed, the most obvious is called XMLHttpRequest, req= (window. XMLHttpRequest)? New XMLHttpRequest (): New ActiveXObject ("Microsoft.XMLHTTP"); The code to create the XMLHTTP object is a classic example of a browser that adapts to IE and non-IE's two-day camp. Said is no back and no history browser, which is also a satire, mainly refers to the Ajax under the click of the link is not redirect page, so there is no backward and forward, the same, no back and forward will not be saved for browsing history. Back and history exist the fundamental is the change in the URL, under the Ajax people found that the URL can also achieve content to change the cool features, why not? Look http://www.dux2005.org/and http://www.zagodesign.com/, I admit that these two stations did a great job, but in addition to the cool feeling, no use.

Sin VI: XML is just for the cover

XML has been consistently bullish since the day it was born, and I think Jesse James Garrett also forced XML into Ajax in order to become popular. One of the fatal drawbacks of XML is the cost of loading resources, which seems to be a common problem with XML under all platforms. Although Google Map is the Ajax brand spokesperson recommended by Jesse James Garrett, Gmap does not use XML, but uses native JavaScript arrays, and I never use XML when I return data from the server with Ajax. Because it makes me more cumbersome to make the system more slow. The server first calls the XML to encapsulate the data to be transferred, and the client gets the data and then calls the XML to parse it. An important feature of Ajax is that it is lightweight, data transmission as simple and simple as possible, if you really need to transfer a large number of complex data, should also be returned through multiple calls.

Sin VII: The world is so big but can't find its own home

What does Ajax apply to? What can I do? What can it bring? Using Ajax on a Web site is a joke, except for a professional site like Google Maps and Flickr, where the technology is not necessary, and there is a bit of Ajax in the big business application market, but in MS, Sun does not look at Ajax this wild child to sapo in their territory, if everybody uses Ajax, that Java sells to who? Net who sells? So Ajax is not a permanent place in enterprise applications. So it's a big embarrassment that Ajax can't find the right location right now. Suspected disorder Touyi, recently put the target of Ajax to Flash and applet is an example.

Of course, I'm not trying to make Ajax flat. I am very fond of this technology, it can make the eyes of web designers more broad, so that some bold design to become a reality, but I will be very calm and careful use of this sharp weapon, although good, one accidentally stabbed is their own.

PS: This article was written last night, but this morning miraculously saw an article from the Internet ajax:99% bad, the article is for the 2000 famous flash:99% bad written, the point of view and I said a few of the seven cases similar.



Related Article

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.