Sunday, January 7, 2007

Is Ajax and Web Services the same thing?

First I will explain what is AJAX. AJAX stands for Asynchronous Javascript and XML. It is a technique used to update a certain section of a web page without refreshing or reloading the whole page. Why we need to do that? For example, you have a web page which has a news column which display a few lines of news snippets. A “more” button is provided to fetch more information from the server. Without using AJAX, server will response with the whole page of information including those that are not change. The browser will have to reconstruct the whole page again; including the background images, menu, icons etc. This method takes longer time than just updating the section of the page that change, AJAX is used here. You can say that the server is providing a service (news feeding service) and since it is on the web then it is a web service. In strict technical term it is not. Why not?

Web Services strictly speaking is a term used to describe a set of standards that enable one computer to access a set of services or objects on another computers using Internet based network standards. One of the standards is the Object Access Protocol, refer to as SOAP. This standard is used to enable the requesting computer to set up a message which consists of methods and attributes. This is refer to as API (Application Programming Interface). This API can be decribed using a language syntax standard called Web Services Description Language (WSDL). And this information plus other information about the service can be publish to a depository using another standard call UDDI (Universal Discription, Discovery and Integration).

Web Services can be used for Enterprise Application Integration (EAI) or over open Internet environment. It is not restricted on a web application server. Unlike AJAX, Web Services can be used at the server back-end application to access to services provided by other servers in a loosely coupled manner. On the other hand, AJAX focus on the browser and server communications only.

In summary they are not the same.

Andy Tan

No comments: