Cool to the pop tech craze: Trick Ajax

Source: Internet
Author: User
Tags log mail client
Ajax

Author: EASYJF Open Source Team (www.easyjf.com) Big Gorge

A few days ago with Sleepy. CN chat On MSN, he said recently read a noisy a little hot book, is about Ajax technology, asked him how to write, he said to be cheated, asked why, he said all of it is all about CSS, Javascript, XML, are used in our project before, The author said it was true, and then he started to get depressed ing.

  Ajax (asynchronous JavaScript and XML), Chinese translation that is asynchronous add WOW 10 block and two grams 12 Meng (:-0), the word seems to be a popular one, borrow a word from a prawn: "New bottled wine." But this wine is not only delicious, but also easy to intoxicating. This does not, you see each big and small website has launched the Ajax topic, AJAX Development Guide, Daniel, calves have published an article to introduce the comments Ajax, the large and small experts, academics, booksellers together with one after another about the Ajax books (the book is also very good ah, the previous related to DHTML, CSS, JavaScript, XM, xmllhttp and other technical data a copy, and then a encapsulation that package, hundreds of thousands of pages of the book came out, let us sigh that academia is really thriving ah.

Some enthusiastic gurus even predict that Ajax will change and potentially replace the traditional web development model. Let a lot of just learn jsp, struts newbie (novice) even doubt whether they have cast the wrong tires, choose the wrong way.

Always wanted to join in the fun to write about the topic of Ajax, but has been difficult to do, here a few words. Engage in B/s development, do not need to spend too much of the study of these, the focus is still to the basic knowledge of B/s to learn a solid, the client's theory includes DHTML, CSS, JavaScript, XML, Java-EE server-side or same design patterns, UML modeling, Servlet, JDBC or ORM Systems, XML, EJBS, and some frameworks, tools, and so on.

Ajax more applied to the FAT client, in most of B/s projects, only in very few places need to use, it is not a technology, but a small tool, for an experienced web Developer (familiar with DHTML, JavaScript and XML), Just look at the API documentation for XMLHTTP in MSDN, which can be Ajax in half an hour.

Ajax is used only in the right place, and it requires a lot of data processing (acting as a notification mechanism) in the background, and it takes time to read data from the server frequently, periodically or irregularly.

For example, we often contact the e-mail system, because the e-mail system is generally composed of e-mail servers and clients, when users log in to the e-mail system via the Web, the Web server needs to collect mail from the mail server, the process of the message is sometimes relatively long, And when the user read the message in the process of the occasional new messages appear. The use of AJAX technology in these systems, you can log in when the user does not have to collect all the mail information on the return of the client, while the server-side constantly from the mail server to detect and search for mail, and Ajax clients to start a timed refresh continuously from the server read information, Once a new message is found, it can be reflected directly in the user's web interface.

If you do not use Ajax, you have to read the new server information needs to refresh the page, you can set some of the IFRAME, such as the way to deal with, but because Ajax passed back the structured XML data information, so it can be very good through the JAVASCRITP data processing.

In the chat room system often used, the truth ibid and easier to understand!

Another example is the tree structure that we often see, when the total number of nodes in the tree can be read out at once and then processed by JavaScript, but when the total node has tens of thousands of times, then can not read out at once, because the client is not processed, you need to use AJAX technology, Start reading only the top-level node, when the user selects a node, to the server side read the selected node child node.

In addition, Ajax is also used in the Web page Modal dialog box (that is, the window.showModalDialog method pop-up new page), because the modal dialog box if you need to submit data to the server, it is not directly with form submission, so through the Ajax technology to submit more convenient.

With the efforts of the people of the whole country and the people of the world, there are many frameworks for Ajax, and it's easier to use AJAX technology. Ajax is not magical, there is no new technology, more belong to the design fan, in general, is not a thing. Plainly, its focus is the application of XMLHTTP components, the other content is the web development often needed in the daily necessities (that is, DHTML, JavaScript, XML, etc.), clever daughter-in-law craft again must have the daily necessities to the kitchen. Therefore, for new contact with web development friends, should spend a limited amount of energy and time to learn what to do, do it yourself. Oh!



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.