What is the AJAX enabled Google tool-kit?

/ / JavaScript /
  • 1 out of 5 Stars
Please note: this article is over 15 years old. Information may be out of date.

First things first, Asynchronous JavaScript and XML (AJAX) is not a technology. AJAX is a technique that has brought about a great change in the world of web development.


The AJAX technique comes in response to the increasing demand of interactive web applications. With AJAX, web page exchange small amount of data with the server behind the scene. This means that every time a new piece of data is entered by the user, or there is a request for a change, the entire page does not have to be reloaded. Usability is also greatly affected thanks to AJAX. After all, AJAX creates conditions that are conducive to a complex scenario that is both data-centric and user-centric. The difference between web pages and other applications has been thinned down with the help of AJAX.

As already mentioned, AJAX is not a technology and this technique fuses together various existing technologies such as XHTML (or HTML), CSS, the DOM, XMLHttpRequest (or alternatively IFrame), XML.

Here is how these individual technologies play a role in AJAX:

  • XHTML (or HTML) and CSS are used for mark up and styling information.
  • The DOM (Document Object Model) is employed for the actual interaction that happens with the information that is presented.
  • The exchange of data asynchronously with the web server happens with the use of XMLHttpRequest. Although there are many cases where an IFrame object is used in its place.
  • Even though even preformatted HTML would work, XML is the format often used for the transfer of data between the server and the client.

The advantages and disadvantages of using AJAX are in fact open for interpretation. Here are some of the reasons that are cited as advantages of using AJAX.

  • The main reason for using AJAX is to enhance the user experience, and to make web pages behave more like standalone applications.
  • AJAX enabled pages load faster because it generates HTML within the browser. The net result of the page loading in a staggered manner is the bandwidth consumption for a web page is considerably reduced.
  • The third advantage is widely critiqued because of a common misconception about AJAX - that it is a mix n' match of various techniques, not leaving room for any consistency. Yet with AJAX programmers tend to create a distinct separation between the methods and formats that are employed for the purpose of information delivery. In other words separation between the content that is to be delivered, the structure and style elements of the webpage, and the functionality of the webpage.

On the flip side are the disadvantages that people associate with the use of AJAX.

  • Given that, with AJAX, the page does not register with the history engine of the browser, the user is often unable to use the 'Back' function of the browser. Additionally, AJAX also makes it difficult for users to 'Bookmark' a page at a certain stage of us. The solutions created to tackle these problems have not been adequate, and these issues remain unresolved for the most part.
  • The possible delay between user request and server response, is an obvious drawback of AJAX. This lag, known as network latency is made worse by a phenomenon that has nothing to with the technologies involved. When a page is rendered in entirety the human eye naturally re-adjusts itself to identifying the changed elements of refreshed page. On the other hand, when smaller portions of the page are rendered individually the user may not see the change immediately and imagine latency when it in fact does not exist.
  • Another possible problem is that search engines cannot execute the JavaScript that is a part of the AJAX functionality. It is important to note that this particular problem is not restricted to AJAX.
  • Yet another issue with AJAX is compatibility. JavaScript, which AJAX depends on, may be implemented differently by different browsers.

At the face of it, the disadvantages seem to weigh over the advantages making AJAX seem a less viable option for developers. There is no doubt that AJAX is complex, and there are still not many developers who are acquainted with its language. Yet a change has been brought about with Google slotting AJAX in their applications.

Google's move is a landmark event in the web development arena. Google applied compilers to help them carry out this mammoth task. Compilers give developers the chance to code/develop in a higher-level language, which it converts to a lower-level language which the computer understands. A Java to JavaScript compiler was created so that developers could work in the former and leave it to the compiler to convert the same into the latter. This technology was freely shared with the developer community and is known as the Google Web Toolkit (GWT).

The GWT development cycle is rather straightforward:

  1. Use Java to design, develop, debug, and test. In this process you may or may not choose to employ GWT libraries that seem of use. You are free to use any of the Java tools that you feel comfortable with - Eclipse, IntelliJ, JProfiler, JUnit.
  2. Use the GWT's compiler that distills the application from Java to a set of JavaScript and HTML files which can work with any web sever.
  3. Ensure compatibility of the application with the browsers you want to support.
Get free access to the largest backlink database

GWT can be run in two modes - hosted mode and web mode.

Hosted mode: Most of the development time ordinarily would be spent in this mode because since your application is run as Java byte code within the Java Virtual Machine (JVM), you can have the benefit of employing the debugging facilities in Java.

Web mode: In this mode, the application is run as pure JavaScript and HTML

If AJAX is meant to ease the surfing experience of users, GWT is meant to ease the process of developing to the farthest possible limit. And GWT has made it easy for developers to use AJAX for creating applications. For instance, common errors that occur with JavaScript such as typos and type mismatches can be identified at the time of compilation. There is often a conflict between what is easy for developers to do, and what is beneficial for users. This conflict, needless to say must end in the favor of what is beneficial for users. And the net result of using GWT and making things more convenient for developers would of course a better web experience for users.

The main features of the Google Web Toolkit are:

  • Even though, unlike traditional HTML web applications, GWT applications do not need to fetch new HTML pages as they execute, they do in fact need to get data from the server. Also referred to as a server call, this mechanism is better known as Remote Procedure Call (RPC) and enables interaction with the server across a network.
  • The presence of dynamic and reusable UI (User Interface) frameworks. The key difference between UI frameworks in GWT in comparison to others is the way widgets (Java classes on the client-side that are used to build user interface) are rendered.
  • Full-featured debugging in the hosted mode.
  • Allows for the appropriate management of browser history.
  • Automatic compatibility with different browsers is yet another attractive feature of GWT applications.
  • Yet another feature of the GWT is that it helps you internationalize your applications and libraries.
  • GWT allows you to unit test in a debugger and browser.
  • With the help of the JavaScript Native Interface (JSNI) you can add handwritten JavaScript in the Java code.
  • The most important feature of the GWT is the fact that it is completely open source code.

For the uninitiated, all this sounds too technical. But the very purpose of GWT is to extract developers from the web of technicalities and give them space to create something that speaks with their end-user. And the demand for interactive spaces online is only going to increase. The AJAX trend is catching up and thanks to GWT developers are able to slowly but surely get over their initial apprehensions about the difficulties that AJAX poses. The role of developers in the development lifecycle of a web application cannot be undermined, but with AJAX enabled GWT their role actually ceases to be just that of typing together back-end operations. Google Maps is an excellent example of the advantages of working with AJAX within the GWT framework. Google map is definitive example of something that is dynamic, attractive and completely user-friendly. Finding locations and using functionalities such as zoom in/out instantaneously is a tremendous advancement. Imagine, having to interminably wait for the page to reload when you click on a location or search for it in the search bar? The very purpose of having the map would be defeated, if it was going to take just as much time to look for a specific location online as it would on a printed map. There are some detractors who say

AJAX enabled GWT is the practical way forward. End-users hardly take this for granted, but the work that goes behind creating this ultimate user-experience pays off. And indeed, GWT has made ease of development possible without losing out on user-satisfaction. With techniques like AJAX, and systems like GWT the future of web development is one that holds a lot of promise for users and developers alike!

Dissect your rivals' key traffic drivers

Rate This Article

How would you rate the quality of this content?
Currently rated: 1 out of 5 stars. 1 user has rated this article. Select your rating:
  • 1 out of 5 Stars
  • 1
  • 2
  • 3
  • 4
  • 5

Related Articles

Creative Maintenance Designs

50+ Creative Maintenance Page Designs From Real Websites

In addition to our website maintenance page tutorial, we've decided to publish our collection of the most creative and original maintenance page designs from across the web. We believe that this is the largest collection ever assembled.
IP Lookup

7 Reasons Why You Should Choose Our IP Address Lookup Tool

A few weeks ago we have published a new tool, the IP Address Lookup, which allows to get a buch of different information about an IP address including its reverse DNS hostname, geolocation, whois data (network range, network name, organization and its address and contact details), ASN details, and more.
PHP Performance

The Fastest PHP Function to Check if a Value Exists in an Array. isset vs array_search vs in_array vs other methods

In this article we will find out the fastest PHP function to check if an array contains a value. We will test and compare the performance of five different methods. We will analyze how the parameter $strict affects the performance of array_search and in_array.

4 Performance Tips for Elements Matching in jQuery

Always use ID to select an element if you can. This is the fastest way to select elements. Avoid matching elements by class name. Selecting with class name only will make jQuery search every element in the entire page.

Partial Page Rendering Using Hidden IFrame

Partial-page rendering removes the need for the whole web page to be refreshed as the result of a postback. Instead, only individual regions of the page that have changed are updated. As a result, users do not see the whole page reload with every postback, which makes user interaction with the Web page more seamless.
Improve Your Display Campaigns & Get More ROI