AJAX. do not repeat mistakes

AJAX (Asynchronous JavaScripting and XML) promptly draws interest of webs - developers to use of the certain toolkit - a concrete set of technologies, with which help (in opinion of the majority) the new stage of development of webs - applications is pawned. This set includes (X) HTML, CSS, DOM, JavaScript, XML, XSLT, XMLHttpRequest and as the alternative to XML/XSLT is possible for using JSON and JSON-RPC.


AJAX eliminates necessity perezagruzki webs - pages and allows "hurriedly" podgruzhat` and to transform the necessary information.


For webs - developers, AJAX represents a certain danger which opens the problems connected to the user interface and loading on the server. Therefore I have decided to use the list most often repeating mistakes which was made by Alex Bosvorf, and to place them here in Russian.

Absence of an immediate visual signal at click of the mouse


If because of pressing by the mouse something works certain action AJAX it is necessary to warn about it a visual signal. For example, the button of loading in GMail. When I do{make} something in GMail, the small red button at the upper right shows, that the page is loaded. It is done{made} because of impossibility to means AJAX to initiate the usual user interface if there is a loading of page.

Absence of an opportunity of use of the button "back" (back button)


The button of returning is perfect addition to the user interface back. Unfortunately, the button of returning not so well is friends with JavaScript, therefore loss of this functionality is one of the main reasons to not create web - application which are completely realized on JavaScript.

Change of a status plozhenija to means of links (searches GET)


AJAX applications represent many problems for the users supposing, that operations GET cannot change structure, the form of the application. Changing statuses of the link not only create problems for robots, but also for users, the unaccustomed to that links can affect the application.

Unexpectedly varying and blinking parts of page


First letter A in word AJAX means asinkhronnost`. The problem with asynchronous messages consists that they can confuse at unexpected occurrence. Asynchronous changes on page should appear in narrowly certain places and should be used judiciously. Sverkanie and the blinking in those places on which I do not want to concentrate, returns in days HTML of a tag blink.

Impossibility to create bookmarks or to pass links to friends


One more perfect property of webs - pages is that I can pass links to other people that they could see the same as I see. Also I can create a bookmark of page and come back to her later. JavaScript and consequently AJAX applications can create huge problems in the given model of using. As dynamically pages generates JavaScript, instead of the server the address of page is cut out from a cycle and cannot be already used further in any way. Is very sad to lose such property. It is a lot of AJAX applications with the big attention apply specially konstruirovannye constant links (permalinks) specially to such cases.

Too much code does{makes} a browser slow


AJAX opens a way to more interesting JavaScript to applications, but unfortunately, interestingly often means more code. More code means more jobs for a browser, and it means, that for job of the websites intensively using JavaScript, is especial with a unreasoned code, it is necessary to have the powerful processor that very well function. Earlier the problem with CPU always was the limiting factor for JavaScript, but the gain in capacity of computers does not mean, that the problem has disappeared.

Asynchronous performance of group processing


Using AJAX, you can bring at once in some changes to fields of the form, but it can create many problems. For example, if I clean{remove} many marks (a tag, a daw) each of which am asynchronously sent the server I lose an opportunity to trace the general{common} picture of change checkbox'ov, and the subsequent stream of changes will be irritable and will confuse.

Scrolling of page and loss of the place


One more problem with the pop-up text on page is the effect which influences scrolling of page. I can read clause{article} with pleasure or scroll the long list, and suddenly asynchronous JavaScript the search will decide to cut out the paragraph much above that place which I read, beating out me from process of reading. It definitely irritates and all for nothing spends my time for defining{determining} where I was.