By: Mohit Chawla; Manivannan Gopalan
Jun. 9, 2006 01:15 PM
AJAX has given a new lease on life to the presentation layer just as Web services have given a new lease on life to the application layer. AJAX is a UI model. It's important in the sense that it allows people to use their browsers to directly interact with Web services; it's the best way for people to get at Web services and SOA assets. Currently, Web services perform well on a machine-to-machine level, but there have been problems building usable interfaces to interact with services. AJAX will be the answer to that problem.
AJAX communicates through XMLHttpRequest. XMLHttpRequest helps communications between HTTP servers through XML. From the client side of the application, instantiate XMLHttpRequest and, through its methods, issue an HTTP command such as GET or PUT to the Web server. Through the XMLHttpRequest object you can now easily implement a Web service. Client code invokes them via HTTP, where they accept and return XML code. On both sides of the connection the XML code is managed and traversed.
AJAX is a user interface model and Web services is a back-end functional layer mechanism. AJAX is very helpful in handling multiple Web services where there is a need for updating part of the user interface.