Monday, June 11, 2007

AJAX - A New Approach to Design


If both can be called "glamurnym" something in the contemporary design of interfaces, it is a web. After all, the last time you heard that someone admired interface is not available on the Internet? (Ok, except iPod.) All the latest and innovative work on the Web.
However, the web developers can not do anything to envy from their peers, which desktop-prilozheniya. You have all the strength and speed of response, which seem inaccessible to the web. The same simplicity, which resulted in the rapid spread of a global network now a gap between the user interface, which we can provide, and interaction with the user desktop applications.
The gap is closing. Take a look at Google Suggest. Look, the alleged proposal almost continuously updated as you enter text. Now go to Google Maps. Increase scale. Capture the cursor card and its Moving back and forth. Again, everything happens almost instantly, without waiting reloading the page. Google Suggest and Google Maps are two examples of a new approach to web design, which we call the company Adaptive Path Ajax. It was established as a reduction of <Asynchronous JavaScript + XML> and represents a fundamental breakthrough in our ability on the web.

What is Ajax

Ajax is not a technology. In fact, the number of successful technologies in a decentralized manner, collected in a strong new direction. Ajax combines :

  • standardized presentation using XHTML and CSS;
  • dynamic display and interaction with Document Object Model;
  • sharing and management of data through XML and XSLT;
  • asynchronous data using XMLHttpRequest;
  • and JavaScript, which binds all of this together.
The classical model of Web applications is : most of the user sent back to the HTTP server. The server performs the necessary processing, receives, processes numbers, interacts with various legacy systems and then provides HTML page to the client. The model derived from the original application as a web of hypertext, but those who read the book know what makes web suitable for hypertext not necessarily make it good for software applications.

Figure 1 : Comparison of the traditional model web (left) with the model Ajax (right).

In this approach, many technical sense, but it is not good interaction with the user. The server does its work, which is the user? Correct, waiting. And with each user to step forward again and again.
Obviously, if we have created a web from scratch, it would not force the user to wait all the time. If the page is loaded, why should the user interaction with a halt every time program needs something from the server? Indeed, why do you see the app connects to the server?

What is the difference between Ajax

Annex Ajax preclude interaction type start-stop-start-stop by the introduction of Ajax as the intermediate layer between the user and the server. It may seem that adding a new level in the annex can only slow down the reaction, but actually the opposite.
Rather than download page at the beginning of the session custom browser downloads Ajax engine, written in JavaScript and usually concealed in a hidden frame. This engine is responsible for developing the user interface and interaction with the server on the user's behalf. Ajax engine allows interaction with the user asynchronously, that is, regardless of interaction with the server. So you no longer need to watch a blank browser window and cursor in the form of lost hours in anticipation of the server.

Figure 2 : Comparison of the traditional Web interaction diagrams (top) and asynchronous applications Ajax (bottom).

Each of the user, which usually produces HTTP now instead takes the form JavaScript-vyzova engine Ajax. Every response to the user who does not require treatment to the server, such as simple data validation, editing data in memory, and even some navigation, engine running independently. If the answer requires information from the server, such as loading additional interface code, data processing, or new data, the engine performs the necessary requests asynchronously, usually using XML, without interrupting user interaction with an application.

Who uses Ajax

Huge investments in the Ajax approach makes Google. All the major products announced last year Orkut, Gmail, the latest beta version of Google Groups, Google Suggest, and Google Maps - Ajax applications. (For technical details of Ajax read the excellent research Gmail, Google Suggest and Google Maps.) The rest remained behind : many favorite all properties service Flickr rely on Ajax and retrieval from Amazon use a similar technique.
These projects demonstrate that Ajax is not only in theory but also in practice for real applications. This is not ordinary laboratory theory. Applications Ajax can take any size from a simple and consists of a Google Suggest to a very complex and intricate Google Maps.
Working with Ajax last few months, we Adaptive Path realized that opened only the tip of the iceberg of the wealth of interaction and the speed of response, which provide applications Ajax. This is an important development web, and its importance will only grow. And given the large number of developers who already know how to use the technology, we expect to see a growing number of organizations will follow suit and use Google competitive benefits offered by the Ajax. What's next
The main task of building applications Ajax is not technical. Indeed, the underlying technology, the Ajax conditioned, stable and well understood. Rather, the challenge for developers of these applications is to forget about their perceptions of the restrictions web and start thinking more, a wide range of capacities.
It would be interesting.
Questions and answers.

March 13, 2005 : After the publication of essays Jesse we got a huge number of letters from readers with questions about Ajax. Here Jesse answer some of the most common questions.

Question. Is Ajax inventor company Adaptive Path, or did Google? Attended the company Adaptive Path in a Ajax-prilozheny Google?
Answer. Neither Google nor Adaptive Path is not inventing Ajax. Latest Google simply the best examples of applications Ajax. Adaptive Path was not involved in the development Ajax-prilozheny Google, but we did for its other customers.

Question. Is Adaptive Path sells components Ajax is the owner or registered trademark? Where they can be downloaded?
Answer. Ajax is not something that can be downloaded. This approach, a way of understanding of the architecture of Web using certain technology. Neither approach nor the name Ajax are not owned by Adaptive Path.

Question. Is Ajax another name for XMLHttpRequest?
Answer. None. XMLHttpRequest only part of the equation Ajax. XMLHttpRequest is the technical component that makes asynchronous interaction with the server; Ajax we call the general approach described in the article, which is based not only on XMLHttpRequest, but also the CSS, DOM, and other technologies.

Question. What does it give the whole name?
Answer. It was something more than a short <Asynchronous JavaScript + CSS + DOM + XMLHttpRequest> to discuss the approach with customers.

Question. How asynchronous interaction with the server has been available for many years. What is novel approach Ajax?
Answer. The novelty of using these outstanding way to change the basic model of interaction in the real web. Ajax provides only now because the time required for the development of these technologies and ideas about how best to apply them.

Question. Ajax is the technological platform, or just the style of design?
Answer. Both. Ajax is a collection of technologies used together in some way.

Question. For applications which type is best suited Ajax?
Answer. While we do not really know. Because of the relative novelty of this approach, our perception of where it is best applied is still in its infancy. Sometimes the traditional model is the best web solution to a problem.

Question. Does this mean that Adaptive Path anti-Flash this?
Answer. Just no. Macromedia is a customer of Adaptive Path, and we have long supported Flash-tehnologiyu. As specialists in Ajax, we expect that for some specific tasks that Ajax will be the most passing decisions, and sometimes the best solution would be Flash. Also, we are interested in exploring ways of combining these technologies (as in the case of Flickr, which uses both).

Question. Does Ajax restrictive access or compatibility with browsers? Do disable applications Ajax button <Back>? Is Ajax with REST? Are there views on security developments in Ajax? Can be developed Ajax-prilozheniya to work in the off JavaScript?
Answer. All these questions can only be answered <can be>. Many developers are already working in this regard. We believe that there is still hard to find any restrictions Ajax, and anticipate that the course will meet with the developer many such issues.

Question. Some of the examples you use Google XML altogether. Should I use XML and / or XSLT annex Ajax?
Answer. None. XML is one of the most advanced ways to input and output data from the client part of Ajax, but nothing prevents you achieve the same effects using such technology structure for the exchange as JavaScript Object Notation or the like.

Question. Simply Is An annex Ajax compared to the traditional Web?
Answer. Not necessarily. Ajax annex inevitably leads to the launch complex JavaScript code on the client side. Not so easy to do it that complex code efficient and free of errors, and to the success of this will require better design and development tools.

Question. Can annex Ajax is a better interaction with the user than traditional Web?
Answer. Not necessarily. Ajax more flexible interface designers. However, the more power we have, the more care is needed to treat it. We must be careful to use Ajax to enhance ease of use applications, rather than worsen it.

No comments: