Why Use GWT for AJAX Applications?
AJAX is a very attractive technique for many web developers. It allows users to interact with your site and communicate with your database without refreshing the pages. However, owing to their dynamic nature, Ajax interfaces are often harder to develop when compared to static pages. In order to reduce the complexity of development, people have started to build up some libraries to support AJAX, such as JQUERY and GWT.
Beginning with AJAX
The preceding chart shows how Ajax works. The browser listens to the event and creates an XMLHttpRequst object when the event is triggered. XMLHttpRequest object is the object that used to communicate between server and browser instead of HttpRequest, which would refresh the whole page. Most modern browsers have a built-in XMLHttpRequest, but IE6 and many earlier versions don’t support this object.
Google Website Toolkit
The Benefits of Using GWT
GWT is a Java environment, which is well known for its clear object concept and easy maintenance. While in development, you can run your Java code in a special “hosted mode” browser with all of the mature, sophisticated Java debugging tools you always have available.
GWT support many ways to process asynchronous communication between the browser and the server. One of them is the RPC mechanism, which defines interfaces and implementations for the server functions, and code will be generated to allow your client code to call them as if they were simple local methods. This replaces defining XML or JSON data formats for requests and responses. Meanwhile, GWT also support the JSON and XML over HTTP.
More importantly, GWT applications provide true interactivity with lots of code being executed on the client, reducing server-side interaction to a minimum. As a result, it provides very good usability and enhances the user experience.
There are lots of good reasons to choose GWT, and these are just scratching the surface. With the increasing popularity of cloud computing, more and more applications are on track to become web-based. GWT would be a very good framework to help you build your “real on-line application”.Tweet