AJAX development brief (Part I)
Related Tags:
Now, there is a growing popularity of the "old" technologies that can completely change this distress situation. That is AJAX. Now, with Gmail, Google-maps of the various applications and the support of the browser, AJAX is gradually attracting the attention of the world.
1, AJAX definition of AJAX (Asynchronous JavaScript and XML) is a comprehensive variety of technologies, including Javascript, XHTML and CSS, DOM, XML and XSTL, XMLHttpRequest. Of which:The use of standardized showed XHTML and CSS, DOM use of dynamic Display and interaction, the use of XML and XSTL data exchange and processing, use XMLHttpRequest object to asynchronous data access, the use of Javascript bundled and processing of all data.
AJAX raised before in the industry for this technology are just the use alone, without the integrated use, but also because of the technology needs before the decision. With the extensive application, AJAX has become a Xiangbobo.
Second, the status quo and the need to address the issue of traditional Web applications using synchronous interactive process, in which case, users first to trigger an HTTP server acts or request cry. Conversely, the server to perform certain tasks, a request issued to the user returns an html page. This is not a consistent user experience, the server in the handling of the request, most of the time users are waiting for the state, is a blank screen content. Following plans:

Since the adoption of the Web hypertext transmission and after the show, so we are using a transfer. When the load is relatively small, and that it would not reflect what is wrong with. But when relatively large load, response time is very long, one minute, two minutes…… a few minutes of, it's not wait for the 275. Serious, more than the response time, the server simply tell you pages can not be used. In addition, certain times, I just want to change a small portion of pages of data, why do I have to reload the entire page? ! When the software design increasingly emphasize the humanity of the time, so the user experience is simply bad and runs counter to this principle. Why always waiting for the server to let users take data? At the very least, we should reduce the waiting time for customers. Now, in addition to program design, coding and server tuning optimization, it also can be used AJAX.
Third, why use AJAXWith the traditional Web Application different AJAX using asynchronous interaction process. AJAX server between the user and the introduction of an intermediate media, thereby eliminating the network interaction in the process of dealing with - wait - processing - waiting for shortcomings. A user's browser in the implementation of a mandate that is loading AJAX engine. AJAX engine prepared by the JavaScript language, usually hidden in a hidden framework. It is responsible for compiler and the user interface and interaction between the server. AJAX engine allows users and applications is the interaction between the asynchronous process, independent of the user and the network server exchanges. Now, Javascript can be used to replace the call AJAX engine produced an HTTP user moves the data in the memory editorial page navigation, check these data do not reload the entire page needs to be AJAX to implement.


Use AJAX, for the ISP, developers, end users convenient foreseeable:
- Reduce the burden on the server. AJAX is the principle of "on-demand from data" can be the greatest degree of redundancy reduction request, and response to the financial burden on the server.
- No Refresh to update pages, psychological and actual users reduce the waiting time. In particular, when a large amount of data to the reader, not as a black and white as the Reload, AJAX use XMLHTTP object request and sent by the server response, and without reloading the entire page with the circumstances Javascript DOM final operation update pages. So in the process of reading data, users face is not black and white, is the original page content (You can also add a Loading of the boxes that allow users read data in the process), only when the data only after receiving complete update the corresponding part of the content. This is an instant update, users almost no feeling.
- Will enhance the user experience.
- Some of the previous server can be the work of the burden shifted to the client, the client use idle capacity to deal with and reduce the burden on the server and bandwidth, space-saving and broadband rental costs.
- Can call external data.
- Based on the widely supported by the standardization of technology, do not need to download plug-ins or applets.
- Further promote and display pages from the data.
AJAX development in the application of the above, Google is doing my part and set an example. Orkut, Gmail, Google Groups, Google Maps, Google Suggest have applied this technology. Amazon's A9.com search engine also adopts similar technology.
Microsoft is also actively developing more sophisticated AJAX applications: it will be introduced, code-named Atlas AJAX tools. Atlas AJAX functionality beyond itself, including the integration of Visual Studio debugging. In addition, the new controls will allow ASP.NET controls and client server-side code bundled much easier. Atlas framework, the script (Atlas Clent Script Framework) also associated with the website and interactive projects more convenient. Visual Studio 2005, but does not include this feature.
Microsoft recently announced Atlas framework, the script will contain the following elements (For more detailed information please visit the Atlas website):
- An expansion of the core framework, it added a JavaScript function: if the same period of life management, succession management, multicast processor and interface management.
- The Basic function of a common class libraries, is rich in string handling, timers and operation tasks.
- Additional dynamic behavior of HTML user interface framework.
- One group was used to simplify network access server connectivity and the network stack.
- A group of rich user interface development controls, such as: automatic completion of the text box, and drag-and-drop animation.
- Dealing with differences in the browser script of the browser compatibility level.
Typical, Microsoft will AJAX technology applications in MSN Space above. Many people have been on the MS Space Services am very surprised, when submitted replies to the future, the browser will be temporarily pause, and then a set of circumstances to comment on my show. AJAX this is the effect of the application. Just think, if we should add a comment reload the entire page, it can be really cumbersome.
At present, AJAX applications is the most common areas of GIS-Map regard. GIS search stressed that the regional rapid response, AJAX fits well with the characteristics of this demand.
5. Use AJAX to improve your design can be achieved without AJAX Although refresh updates page content, but is not what can be used, mainly in interactive applications more frequently read data, data classification good Web applications. Now, let us cite two examples to see how to improve your design AJAX.Example 1: Data validation
Content in the form of the input form, we often need to ensure the uniqueness of the data. Therefore, often in the pages provide a "uniqueness of the check" button allows users to click open a small window check or submitted to the form, such as server-side, judging from the server after returning to the corresponding calibration information. The former, window.open operation itself is relatively resource-consuming, usually by the window. ShowModalDialog substitute, even if this should pop up a dialog box; the latter, the need to submit the pages to the server by server judgement check, the process is not only a long time and increase the burden on the server. And the use of AJAX, the check request can be issued by the XMLHttpRequest object, the whole process does not require a new pop-up window, the whole page does not need to be submitted to the server, the server quickly without increasing the burden. Example 2: from on-demand data - Cascade menu
Previously, in order to avoid the operation of each of the menu caused by heavy load pages, do not use the Background of each call, but one-time menu will cascade all the data read from and write full array, and then depending on the user's operation JavaScript used to control the subset of the presentation of the project, so that solved the response speed operation, as well as to avoid heavy load pages sent to the server frequent requests, but if the user does not operate or menu in the menu only on the part of operation, then read the data will become part of redundant data users waste of resources, particularly in the complex menu structure, a large quantity of data circumstances (such as menu-there are many, and each has a dish on the 100 projects), the more prominent such defects.
AJAX application now in the initial pages, we simply read out its first-class and all the data shows that in the operation of a user of a menu, Ajax will be passed to the current request a background of the two projects are - sub-menu of all data, if the request has been presented to two of a menu, after the request to the two operated by the corresponding menu item menu all three of all data, and so this…… with What to take what, how much to take the number, there will be no data redundancy and waste, reduce the total data download and updated pages not override all, only need to update the update can be part of that phase For background processing and heavy-duty way to shorten the waiting time for customers, but also to the waste of resources to a minimum.
Example 3: Read external dataAJAX can call external data, therefore, some data such as the development of XML documents, RSS files for secondary processing, data integration or application development. 6. AJAX defects
AJAX is not a perfect technology. Use AJAX, some of its shortcomings to weigh:
- AJAX large-scale use of Javascript and AJAX engine, and this depends on the support of the browser. IE5.0 and above, Mozilla1.0, NetScape7 and above to support Mozilla, although AJAX support, but provides XMLHttpRequest manner not the same. Therefore, the use of AJAX procedures must be tested against various browser compatibility.
- AJAX updated when the content pages and did not refresh the whole page, therefore, the back page function is invalid; some users often engage in the data is unclear now old or have been updated in recent years. The obvious Position on the need to remind the user "data has been updated."
- Convection media did not support FLASH, Java Applet good.
- Some handheld devices (such as mobile phone, PDA, etc.) is also not very good support for Ajax.
- Master Ajax, Part 1: Introduction Ajax
- Flash ads player development
- AJAX classic article (part of the Chinese version)
- Learning Flash: FLASH music on the part of settings
- HTML and CSS development norms
- Qingzheweiwang website on the direction of development
- Master Ajax, Part 3: High Ajax in the request and response
- AJAX development brief (Part I)
- XHTML document development process
- Css attributes part (b)
- AJAX development of the generic category
- Smart forces hip-hop music among my key part of the production
- Home page in the development of China
- After greeting the hubbub development WEB2.0
- RSS Development Guide
- RSS: the Internet an indispensable part of life
- Standardization of the development of the Web site to whom?
- Depth understanding of the history and development of RSS
- Day a Code (Part I)
- Liu Ren: Site visit is part of the accumulation by
- Flash8 production of the game (map Part 1)
- Ajax and REST, Part 2
- Web site development Trilogy
- And the development of Web2.0 BLOG
- FLASH FLASH Avatar part Source Code Analysis
- CSS development manual
- Rapid development of XHTML (Head)
- JavaScript Object-Oriented Programming, Part I: inheritance
- Making use Dreamweaver MX 2004 ASP dynamic website (Voting System Part 1)
- Java development for the Ajax technology
- Setting standards development site
- You should be concerned with: the future of HTML, Part 2: XHTML 2.0
- AJAX initial development framework
- Java development for the Ajax: Use Google Web Toolkit development Ajax
- AJAX development of a learning Notes
- Part V reference master Ajax
- Asp.net javascript + + css (imitating the drag personality google page layout) (Database Part 1)
- AJAX development brief
- Fun with css part 1 (the first part of a happy master CSS)




