Seven Deadly Sins of "AJAX"

Source: Internet
Author: User
Tags add error handling html form net reference client
Ajax I do not carry any subjective color to comment on this so-called "AJAX seven sins."

1, even with Flash and Ajax a piece of scold.

References: web without links like a lamb lost in the forest, this seemingly advertising phrase is actually the fundamental principle of web design.

The "principle" at least I don't know, so it seems to be just a slogan. My principle is that Web apps first need to be friendly to end users before they need to be considered for search engine friendliness. The data you submit using HTML FORM is also not linked, can this data be searched by search engines? In other words, you can add a request that is sent only through the Get method in the link URL. Can search engines even search for FORM data submitted using the POST method? If search engines can search for this data, is it difficult for search engines to search for XML data that is also sent in plaintext through the HTTP protocol?

It is also limited to consider the application of search engine friendliness. Do you think Google is really not able to solve these problems? Too underestimate Google, right?

2, this author apparently rarely do javascirpt development, so that there is no investigation of such words to:

Reference: 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.

m$ Visual InterDev, and the Script Debugger in Office 2003 are very handy debugging tools. If you don't want to spend money on these tools, you can also use the Venkman developed by Mozilla, and the debugging features are already perfect. Say JS not very good IDE is the truth, said JS no good debugging tools is a big joke.

3, reference: And above said that the layer contains JS file is the common problem of Ajax, coupled with the past many of the service-side code now put to the client, so every time 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.

There is no investigation of nonsense, if through different files for the JS code for the serious organization, the JS function to many small files, a page just need to load its own use of JS files, how to redundant code?

4, reference: What is called the Web Standard damage? Click to view all, which is to break the Web standard. 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?

This is only a specific application of the usage, incredibly also to the Ajax head, really bones, no word. Wouldn't it be easy to simply replace span with a? If you use a, you can't use the onclick? According to the author's idea, it seems that all a should only be simple links, can not add onclick, plus the onclick became Ajax, it violated the dogma, the WEB standards destroyed. and to the span plus a onclick actually Ober to destroy the Web standards of the level, I studied the Web standards for so many years, I do not see what is the destruction of which one of the web standards. What is the requirement in WEB standards that only a is allowed to be used, and span is not allowed to be implemented? Moreover, in the latest XHTML 1.2 standard, A has become a deprecated tag. What is a Web standard and what is breaking Web standards? Go back and turn over the book.

5, reference: Browser and browser differences have always been the heart of the web designer forever pain, 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?

I've mentioned many times about website refactoring, what's the problem with this book? Femto start reading it? Have you ever had the desire to read this book?

The different syntax for creating XMLHTTP objects is only a very small problem, which is a temporary problem before XMLHTTP is completely standardized. Now the development based on the WEB standards, must write for different browsers of snippets of the occasion has been very few, the packaging of these differences in the JS library online has been a lot.

The problem with back/history cannot be solved by using an IFrame in Google Maps, as I said in the BEA User Group speech.

6, reference: XML has a fatal disadvantage, that is the load of resource consumption, which seems to be the common problem of 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.

Is it fatal? I've done so many browser-side XML development, why haven't I felt it yet? Google Maps server-side data to clients is the absolute XML, and other developers can also customize the XML to add their own data. Google Maps also uses XSLT on several features of the client. That Google Maps didn't use XML, would you shut up if I sent you the code for the Google Maps client I had personally sorted out?

7. Reference: 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.

Another bizarre argument. Saying that big companies won't use Ajax is a total subjective assumption. In fact, a large number of large companies using client JS include the following: Macromedia: The Dreamweaver product includes a large number of JS code.

Oracle: Many products are using JS, currently interested in Ajax. The message was told to me by a friend of mine at Oracle in Shenzhen.

SAP: As early as many years ago, SAP used JS+XMLHTTP technology in its products, and it was simply not the concept of sap being fired. To say that Ajax is not suitable for business applications, what does SAP do to eat? Google: I don't have to say anything anymore.

    • Ajax: A new way to build Web apps
    • Discussion on the error handling mechanism of AJAX (2)
    • Discussion on the error handling mechanism of AJAX (1)
    • First experience. NET Ajax Brushless New technology
    • A brief analysis of Ajax development Technology in Rails system (4)


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.