AJAX - A palavra do dia

Publicado em tecnologia por bjr em 26 mar 2005 04:00 PM

Uma das últimas buzzwords que está a surgir na web chama-se AJAX - acrónimo de Asynchronous Javascript and XML. Diego Duval faz uma comparação interessante entre velhas tecnologias e novas tendências.

The basic concept is a simple one: turn a web browser into a more responsive client by making asynchronous requests to the server on another thread, handled by Javascript (there's nothing that says that this couldn't be done with, say, Flash or Java, but Javascript is a more universal platform on which to implement this). This separate thread can create the appearance of a more responsive UI by managing the requests in a manner transparent to the browser's default navigation mechanisms (e.g., Back, Forward, etc.).

In the early 90's, the buzzwords du jour were "client/server systems". These were systems where PCs actually performed a certain amount of processing on data obtained and passed back through tightly coupled connections (typically TCP). As important as servers were in that scheme, one of the keys of client/server computing was that the client maintained most of its state. True, the server did maintain a certain amount of state and logic (just keeping state on a TCP connection would count, for instance), but it was the client that drove the interaction, that kept information on a user's location in the dataflow, etc. The web, however, changed all that.

If the web thin client model decoupled UI from processing (at least relative to client/server), AJAX allows for a flexible "free form coupling" when necessary. By pulling more data-management logic back into the client, AJAX goes back to a more traditional client-server model. True, the server could maintain state if necessary, and undoubtedly some AJAX-powered applications, such as Gmail, do so to some extent. But consider the difference between Google maps and, say, Mapquest. Mapquest stores the current view's data in hidden fields in the page, which have to be sent back to the server on each request. While this is, speaking strictly, stateless operation, the server has to re-create the state of the client for every request, modify it as necessary, and then send it back. Google maps, on the other hand, can keep the state on the client, requesting new data from the server as the user moves around the map, zooms, etc. The result? The server is freed from creating/keeping/updating state and goes back to doing what it does really well, which is serve data.

"So does this mean that we're going back to client/server? Doubtful. There is no silver bullet. As cool as AJAX apps (like Google Suggest, Google maps, or A9) are, I suspect that AJAX's greater value will be to add another tool to the toolset, allowing for hybrid thin client/fat client applications that improve web UI interactions and bring us to the next level of distributed applications."

Já conheçe a nossa newsletter semanal? Receba ao fim de semana o que melhor aqui se falou nos outros dias. Com base na popularidade dos artigos e no nosso criterio editorial, somente o melhor, ao sábado! Assine já!
 
Faça parte da nossa comunidade. Assine a nossa newsletter semanal, com a seleçãos dos melhores artigos semanais. Subscreva ainda o nosso feed de RSS, twitter ou newsletter diária. O obvious é actualizado diariamente com artigos de diversas áreas.

artigos relacionados

nenhum comentário

Os comentários a este artigo são da exclusiva responsabilidade dos seus autores e não veiculam a opinião do obvious sobre as matérias em questão.







 
(obrigatório, não será mostrado no site)


Inagaki PHP Scripts site statistics