Google Web Toolkit

Rate Google Web Toolkit:
Community:1 Star2 Stars3 Stars4 Stars5 Stars (3 votes)
Loading ... Loading …Maturity:1 Star2 Stars3 Stars4 Stars5 Stars (4 votes)
Loading ... Loading …Documentation:1 Star2 Stars3 Stars4 Stars5 Stars (2 votes)
Loading ... Loading …Resources:1 Star2 Stars3 Stars4 Stars5 Stars (2 votes)
Loading ... Loading … Customization:1 Star2 Stars3 Stars4 Stars5 Stars (2 votes)
Loading ... Loading …Integration:1 Star2 Stars3 Stars4 Stars5 Stars (3 votes)
Loading ... Loading …

Google Web Toolkit (GWT) is an open source Java development framework that permits you gets away the matrix of technologies which make writing of AJAX applications so complicated. Development and debugging of AJAX applications in the Java language becomes easy with GWT. The GWT compiler interprets your Java application to browser-compliant JavaScript and HTML while deployment of application to production.

Brief overview of GWT development cycle is as under:

  • Choose your preferred Java IDE to write and debug an application in the Java language, using as many (or as few) GWT libraries as you find useful.
  • For serving with any web server use GWT’s Java-to-JavaScript compiler to condense your application into a set of JavaScript and HTML files.
  • Make sure that your application works in all browsers that you desire to support.


Productive Development Platform


Java technologies present a productive development platform, and in addition, with GWT they can directly become the basis of your AJAX development platform. Here are some of the advantages of developing with GWT:



  • For AJAX development you can make use of all of your preferred Java development tools, like Eclipse, IntelliJ, JProfiler and JUnit etc.
  • While reducing errors, static type checking in the Java language improves productivity.
  • General JavaScript errors (typos, type mismatches) can be easily fixed at compile time rather than by users at runtime.
  • Code completion is extensively accessible.
  • Automated Java refactoring is pretty flashy now days.
  • Java-based object oriented designs are easier to communicate and understand, as a result making your AJAX code more understandable with less documentation

Usage of Google Web Tool kit


To construct the UI elements (that make AJAX application), you can utilize GWT’s set of UI components (called Widgets). Akin to conventional UI frameworks, Widgets are combined in Panels that decide the layout of the widgets contained within them.


GWT holds up a diversity of built-in Widgets that are useful for AJAX applications, including hierarchical trees, tab bars, menu bars and model dialog boxes. For remote procedure calls and other more complicated web application features, GWT provides built-in support.

Different Modes of GWT Applications


GWT applications can be debugged and deployed in two modes:


Hosted mode - In this mode application runs as Java byte code within the Java Virtual Machine (JVM). Automatically development time in hosted mode will increase because running in the JVM means that you can take advantage of Java’s debugging facilities.


Web mode - In this mode application is run as pure JavaScript and HTML, compiled from original Java source code with the GWT Java-to-JavaScript compiler. When you deploy your GWT applications to production, you deploy this JavaScript and HTML to web servers, so end users will only see the web mode version of your application.

Google Web Tool Kit Architecture


GWT has four key components that are a Java-to-JavaScript compiler, a “hosted” web browser, and two Java class libraries:


Google Web Tool Kit Architecture

The components, from bottom to top description are:



  • GWT Java-to-JavaScript Compiler: The GWT Java-to-JavaScript compiler interprets the Java programming language to the JavaScript programming language. GWT compiler can use to run GWT applications in web mode.
  • GWT Hosted Web Browser: The GWT Hosted Web Browser allows running and execution of GWT applications in hosted mode, where code is running as Java in the Java Virtual Machine without compiling to JavaScript. For achieving this, the GWT browser sets in a special browser control (an Internet Explorer control on Windows or a Gecko/Mozilla control on Linux) with hooks into the JVM.
  • JRE emulation library: GWT includes JavaScript implementations of the most extensively used classes in the Java standard class library, including the majority of the java.lang package classes and a subset of the java.util package classes. Remaining Java standard library isn’t supported natively within GWT.
  • GWT Web UI class library: The GWT web UI class library is a depository of convention interfaces and classes that permits your create web browser “widgets,” like buttons, text boxes, images, and text. This is the core user interface library used to generate GWT applications.

Features of Google Web Tool Kit


  • Dynamic and reusable UI components: Generating Widget by compositing other Widgets. Put Widgets automatically in Panels. Throw Widget to other developers in a JAR file.
  • Straightforward RPC: Just need to describe serializable Java classes for request and response, to communicate from web application to web server. In production, GWT automatically serializes the request and deserializes the response from the server. GWT’s RPC mechanism can throw exceptions across the wire and even handle polymorphic class hierarchies.
  • Browser history management: AJAX applications don’t require tobreak the browser’s back button. GWT permits you to make your site more functional by simply adding state to the browser’s back button history.
  • Debugging: Code is compiled to JavaScript, in production but at development time it runs in the Java virtual machine. Means that when code performs an action like handling a mouse event, you find full-featured Java debugging, with exceptions and the advanced debugging features of IDEs.
  • Browser compatible: With no browser detection or special-casing within code, GWT applications automatically support IE, Firefox, Mozilla, Safari, and Opera.
  • JUnit incorporation: Unit testing in a debugger and browser is allowed due to GWT’s direct integration with JUnit. Even unit test asynchronous RPCs.
  • Internationalization: generate, without problems, efficient internationalized applications and libraries.

Something Good about Google Web Tool kit


For evaluating GWT’s efficiency relative to traditional AJAX development are:



  • Compiler-generated JavaScript size A distinctive, full-featured GWT application will entail the user to download about 100K of JavaScript, which is in line with majority of hand-written AJAX applications.
  • End-user performance Mostly GWT applications are as fast as hand-written JavaScript. The GWT compiler keeps away from adding any wrappers around any functionality that puts into practice in the browser.
  • Development time Instead of spending little time on debugging problems in individual web browsers, you can spend most of your time on application functionality.

Something bad about Google web Toolkit


As now we well know that GWT compiles JavaScript and HTML from Java bytecode. This model will in most situations generate much larger JavaScript and HTML than what is possible to attain with solutions where the JavaScript Widgets handcoded from before. Substitute way of generating an Ajax framework with “no-JavaScript pain capability” is to think of the browser as exclusively rendering mechanism for predefined widgets and send messages from the server to those widgets and vice versa.

Leave a comment