Let's catch all the questions about Ajax to help you get through the second channel and quickly learn about the beauty and sadness of Ajax.
After years of development, the Web is still in the point of view, page change browsing mode. After the advent of Ajax, rewrite the interactive mode of the Web page must be constantly reload, using asynchronous technology, the Web page only updates the local content, thus providing users with a smoother, real-time interactive mode.
Less "Reload" the action, Ajax presents a more cool than the traditional effect, but whether the full use of Ajax, enterprises in addition to watching the lively, but also want to know "doorway." Will Ajax slow down performance? What are the main learning thresholds? Search engine will not find the content of the Web page, but the impact of the site exposure? Will other Ria (Rich Internet application) technology replace it? More importantly, will it lead to the problem of capital Ann?
Let's catch all the questions about Ajax to help you get through the second channel and quickly learn about the beauty and sadness of Ajax.
Q1: What are the benefits of using AJAX technology besides cool effects?
A: The so-called "cool" should mean that you can drag and drop on the Web page widget, color gradient, components fade/fade in, design larger/smaller effect, or amazing in the Web Mail can provide a similar outlook interface.
In fact, the most direct and obvious benefit is to reduce the number of Web page reload.
According to statistics, every time a Web page is refreshed, 10% of consumers are "sober" in the process of waiting, discovering that there may not be a need to buy and canceling the transaction. When a Web page is no longer modified by a small amount of data, it is necessary to reload the entire page, reducing the time that the user waits and providing a smoother handling experience.
Whether it is cool effect, exquisite screen, or smooth flow, the image of the site, merchandise sales and user experience have added points to the effect.
Q2: The control of fluency on the site is a bonus, but from the perspective of the enterprise, the level of concern also includes the application of intranet, Web applications suitable to join AJAX technology?
A: After we know about the Ajax applications of push Wang, Urmap, Yahoo! and Network Mail2000, we find that web apps are really good for Ajax technology.
Focus on continuous, effectively improve productivity
Application operations often involve complex processes, but after the web, the process becomes a series of Web page submissions (submit) Actions, each update page will take a few seconds to wait, and can not press "previous page" back to the previous step.
In the age of web, the biggest concern of the enterprise is not wasting the seconds waiting to load the page, but the idle waiting, naturally opening another page, and the attention is directed to other, more interesting information, and composure, perhaps half an hour later.
Therefore, for the shopping site, the continuous attention is the guarantee of the order, for the enterprise, it is the promotion of productivity.
Continuing the control experience of desktop applications
The "previous" mode of operation cannot be used to strongly show the differences between the "application" and "browser" operating habits. When an application executes an environment that is moved to the Web, the user still expects to retain the operational experience of desktop applications, through Ajax asynchronous technology, that has the opportunity to eliminate the gap between the application and the browser.
Take Yahoo! Mail Box and Mail 2000 as an example, after Ajax, the user experience is very similar to the operation of Outlook. Network engine information from the user's feedback found that because of the change in control mode, so that intuitive and convenient forward a big step, so users satisfaction significantly improved.
Q3: Will it slow down Web server performance?
A: Probably because of the cool effects of Ajax and the fact that the first time you load an AJAX page is longer than the average HTML page, it's easy to assume that using AJAX will slow down server performance. In fact, just the opposite!
Ajax technology differs from traditional Web pages and Web servers in terms of communication. The traditional approach is for the user to send a request to the Web server, and even if only one field is changed, the Web server still needs to reorganize a full web page, respond (Response) to the client, and the browser must reload again.
No commit action is triggered in the process, the Web server only has to return the content that needs to be modified, and the browser has no reload action. This is a three-win situation for server load, bandwidth usage, and user-side operational experience.
Based on Urmap's experience of using AJAX technology to deliver map information, the server's burden is reduced by more than 10 times times the number of users, and bandwidth usage has not increased too much.
Then take the network engine information Mail 4.5 Beta version of the Ajax technology as an example, the observation results found that the server needs to calculate the amount of data to reduce the bandwidth cost also decreased. Take a one-page list of letters as an example, the past 100 messages about the need to transfer 120KB of data volume, now reduced to 30KB. Click the "New Letter Check" feature, the amount of data delivered is roughly the past 1/5~1/4.
Q4:autocomplete This kind of Ajax mechanism, frequently to the server to data, should slow down the performance, whether there are methods to solve?
Answer: AutoComplete or content Automatic Update Ajax mechanism, is the user very much like the function. But when the numbers are large, it is possible to slow down server performance.
However, such problems can be solved by design, such as setting up a quick-access mechanism, prolonging the reaction time, querying every 3 English letters, or restricting the use of data, etc., which are possible solutions.
"This is a way to manage resources," Chao Junhong, a urmap technology leader who led the development. "He example: Urmap Download the map information, in fact, slightly more than the scope of the Web page display, users to drag or zoom the map, in fact, called the use of the local data, and did not send a request to the server." Therefore, as long as the user's behavior pattern to adjust the design, you can reduce the burden on the server.
Q5: So how does Ajax affect the performance of the client?
A: Compared to the traditional Web page, Ajax technology allows the client and server to transfer less data, but also to avoid the Web page reload opportunities, Ajax operating phase of the performance is indeed better.
Q6: If the enterprise wants to import Ajax, is the talent good to look for?
From a developer's standpoint, Chu Jihong, the founder of Twitter, thinks: "css and Dom are the main thresholds. 」
Ajax technology is beyond the scope of simple programming, developers need to work with designers, and understand Web pages related to CSS, DHTML, Dom and other technologies. Even though the mature tools are less difficult to learn, the more you need to learn, the more you will become a barrier.
Q8: So, does the Web development team's role positioning and cooperation approach, because the introduction of Ajax and must change?
A: The way of working is really going to be impacted. Take Yahoo! As an example, in the past, web design was divided into VD (visual Designer, visual designer) and RD (Research Developer, researcher) two roles. VD is responsible for web design, must understand the HTML application, RD is familiar with the technology of PHP, API, database and so on, let the Web page to concatenate back-end program and data.
The Web page design process to WD, is still not a real page, not yet connected to the backend real links and data. When the page is handed over to Rd, the RD person is responsible for the actual links and data.
This development process is not unique to Taiwan's Yahoo! design, in the United States Yahoo! , they call WD the front-end Engineer, while the sweet potato cane is called web Master; trend technology is called Prototyper.
The change of working form is the inevitable trend. The design of the current Web page, in addition to the art, also contains a programmatic mechanism, the role of people and the development process will change. Even in the case of limited manpower, one must be decorated in two corners (usually the work of Rd and WD), but the mode of cooperation between design (Designer) and development (Developer) is still different from that of the past.
But there are some options. Just like IE browser has launched Internet Explorer Developer Toolbar, or can choose IE Inspector launched Axscripter, and Firefox provides Firefox Debugger. With the help of these plug-in kits, the difficulty of debugging has been gradually reduced.
Q10: An existing Web site or Web application, is it recommended to overwrite it with Ajax technology?
A: If an emerging Web site or Web application, especially a product Web application or Web site, uses AJAX technology, it's almost an option, and it's easy to lose competitiveness if you don't provide AJAX results.
However, for existing websites, "technology for technology" is irrational behavior. "Advances in technology will always help, but we have to consider whether there is value in investing," Chao Junhong said. Companies should think about what Ajax can do. 」
Chu Jihong suggested: "For specific problems, using AJAX to solve the technical bottlenecks." "Many functions are often far-reaching, and a slight change must be completely rewritten, and the risk of a full renovation is too high."
Ajax is a collection of many technologies. For beginners, the threshold of Ajax is not low. Even if only micro-changes, in the process of testing and on-line, there are still a lot of trivial work to face, so it is not necessarily wise to adopt the decision.
Will Q11:ajax technology have a cross-platform limit?
A: If you ask if Ajax can cross the operating system platform, the answer is yes.
Q12:ajax technology How to solve the problem of cross-browser?
Or, the simplest way, is to apply Yui and other frameworks, through the platform to solve the compatibility problem.
Can the application of Q13:ajax development run smoothly on different devices such as computers, mobile phones and PDAs?
A: The answer is no. "The main reason is that mobile devices support different specifications, regardless of J2ME, Flash or Ajax," said Feng Yanwen, general manager of the Act. 」
Moreover, each handset's screen size is different, moreover the general webpage data volume fills the handset screen to appear to be lengthy. To be aesthetically pleasing, it is necessary to provide specialized content for the action device. For example, Twitter, a well-known foreign micro-blogging site, designs specially designed website m.twitter.com for mobile platforms.
Q14: I heard that using AJAX to develop Web content, search engine may not be found, it will not affect the visibility of the site?
A: Actually, it's a design problem. This relates to a proprietary noun called SEO (search Engine optimization, search engine optimization). About SEO concerns, the principle of the search engine for the robot is based on the link to find other Web pages, and then find content, so Web content must use a fixed URL (permalinks), search engine will find.
Chu Jihong said: "This is a kind of thinking of website design." If you want to increase the exposure, you will be able to be found by the search engine. "Push the King about AJAX technology is mostly used in visual, each information has a separate Web site, they absolutely do not destroy the principles of"content unique"."
Q15: What kind of application is not suitable for using AJAX?
A: The following scenarios do not recommend the use of AJAX technology:
The scale of the page needs to change is very high
Zhang Jiaji stressed: "Depends on the key point, is how much data to move to the browser." "ajax suitable for use in local, a small amount of data changes to reduce the opportunity to reload the page, the page needs to update the ratio is very high, it is better to reload it!
After the popularity of ASP and JSP, it is a common application to build dynamic query report on Web page by using DataGrid control. In addition to the simple query function, you can also choose any location to change the way the field is sorted. This kind of application is not suitable for using AJAX.
Especially in the case of the number of data pens, Zhang Jiaji stressed: "20 pen and 100 of data, the impact on the effectiveness of the Web page, is absolutely not just 5 times times the gap. "For browsers, change sequencing is the entire DOM (Document Object model, file object models) of the destruction and the system, this kind of application is to be good at data processing database more appropriate."
Need to change the page application
Ajax is the pursuit of the implementation of the data update, so the URL column does not change, and there is no "previous page", "next page" record. Therefore, there is a need for pages, in particular, users may press the "previous page" of the application, it is not suitable for using AJAX.
The reason why Web applications are suitable for AJAX technology is that applications do not have the concept of page-change. Therefore, when developing AJAX applications, designers should also be able to manipulate thinking, bypassing the possibility that users will want to press the "previous page".
Q16: If you pay attention to high interactivity, other RIA technologies, such as Microsoft's Silverlight and Adobe Flash, can provide a more immediate interactive effect, why do you choose AJAX? Will Ajax be just a bridging technology?
A: This question must be divided into the following two levels to answer:
High threshold for Silverlight or Flash
Programmers who are accustomed to thinking on the right side of the brain may not be able to have both flash or Silverlight designed with their left brain. When we asked the push Wang's development team this question, the related person and so on all bobbing expresses does not like the flash. Chen Guanjie in the past to try to use flash experience to say: "flash performance is poor, the stylized behavior must be written in ActionScript. 」
From the Silverlight case presented by Microsoft, the German women's shopping website Otto, France's French-style shopping site, their image, intuitive and smooth design is indeed a dazzling fan.
If there is no professional art talent site, they are more difficult to face Dreamweaver or expression Blend, to accept the timeline (Timeline) combined with the concept of dynamic effects of layers, developers need to cross the threshold higher.
Flash, Silverlight, and Ajax can be used
As far as the Microsoft development Platform is concerned, companies that need a more cool visual effect than Ajax can use expression Studio to design visual elements such as Web pages, images, and animations, while the logical part of the operation is still developing AJAX applications through Visual Studio Tools, so they don't conflict.
Q17: Do you use Ajax to expose your site to higher risks?
Some people think that Ajax programs can see the way its program logic and variable usage through the view of code, and increase the attack surface of the website, unlike the server-side program, can hide the program syntax.
Instead, Ajax solutions developed by the server side, such as DWR, allow users to use back-end Java syntax from a front-end program, which can potentially pose a security threat.
Q18: Is there no potential risk when using XMLHTTP request for asynchronous transmission?
A: In fact, the browser at the beginning of the design of this object, has considered the issue of security, thus restricting the XMLHttpRequest requested resources and call script, both must be in the same domain, can not access the resources outside the network, to reduce the risk. This prevents malicious programs from grabbing data arbitrarily or uploading dangerous programs to other servers.
However, the Web 2.0 popular mashup (mashups), through the open API for data exchange, which is indeed bypassing the same domain restrictions, there is a certain risk. When designing this type of API, you must pay special attention to its access restrictions so as not to allow the hacker to take advantage of it.
Q19:ajax will frequently request information to the server, and will it create a blocking attack on the site (denial of Service) effect?
A: In terms of Ajax design patterns, it is true that the number of requests to the server will increase, often a little bit of a move, it will interact with the Web server or database, especially the more interactive effect.
Google search will take the function of automatic completion, list the possible search keywords, or yahoo-mo dictionary Query Services, there are similar design, as long as the input text, will ask the server to select the word.
This security issue should be viewed on two levels. The first application of this type of Ajax syntax, the original need to do a good job of performance considerations and testing, such as the use of fast access, record query high keyword, but can reduce the burden on the server.
Second, if the hacker is going to use DOS to launch an attack on a Web site, it is not necessarily an efficient way to use Ajax to launch DOS, either in the same way as Ajax.
Q20: If Ajax has a limited impact on the server side, what about the client side?
From this point of view, it is true that Ajax prevails, let hackers have the opportunity to abuse users through XSS, but the success of XSS is usually the site itself already exists in the security line loopholes, such as not to check the user upload information, or the application, the system itself has loopholes, if you can do these security protection , the user is as secure as any other Ajax feature.