Google Web Toolkit


Google Web Toolkit, or GWT Web Toolkit, is an open-source set of tools that allows web developers to create and maintain JavaScript front-end applications in Java. It is licensed under Apache License 2.0.
GWT supports various web development tasks, such as asynchronous remote procedure calls, history management, bookmarking, UI abstraction, internationalization, and cross-browser portability.

History

GWT version 1.0 RC 1 was released on May 16, 2006. Google announced GWT at the JavaOne conference in 2006.
ReleaseDate
GWT 1.0May 17, 2006
GWT 1.1August 11, 2006
GWT 1.2November 16, 2006
GWT 1.3February 5, 2007
GWT 1.4August 28, 2007
GWT 1.5August 27, 2008
GWT 1.6April 7, 2009
GWT 1.7July 13, 2009
GWT 2.0December 8, 2009
GWT 2.1.0October 19, 2010
GWT 2.2.0February 11, 2011
GWT 2.3.0May 3, 2011
GWT 2.4.0September 8, 2011
GWT 2.5.0October 2012
GWT 2.5.1March 2013
GWT 2.6.0January 30, 2014
GWT 2.6.1May 10, 2014
GWT 2.7.0November 20, 2014
GWT 2.8.0October 20, 2016
GWT 2.8.1April 24, 2017
GWT 2.8.2October 19, 2017
GWT 2.9.0May 2, 2020
GWT 2.10.0June 9, 2022
GWT 2.11.0January 9, 2024
GWT 2.12.0October 29, 2024
GWT 2.12.1November 12, 2024
GWT 2.12.2March 3, 2025

In August 2010, Google acquired Instantiations, a company known for focusing on Eclipse Java developer tools, including GWT Designer, which is now bundled with Google Plugin for Eclipse.
In 2011 with the introduction of the Dart programming language, Google stated that GWT would continue to be supported for the foreseeable future while also hinting at a possible rapprochement between the two Google approaches to structured web programming. However, they also mentioned that several of the engineers previously working on GWT are now working on Dart.
In 2012 at their annual I/O conference, Google announced that GWT would be transformed from a Google project to a fully open-sourced project. In July 2013, Google posted on its GWT blog that the transformation to an open-source project was completed.

Development with GWT

Using GWT, developers have the ability to develop and debug Ajax applications in the Java language using the Java development tools of their choice. When the application is deployed, the GWT cross-compiler translates the Java application to standalone JavaScript files that are optionally obfuscated and deeply optimized. When needed, JavaScript can also be embedded directly into Java code using Java comments.
GWT does not revolve only around user interface programming; it is a broad set of tools for building high-performance client-side JavaScript functionality. Indeed, many architectural decisions are left entirely to the developer. The GWT mission statement clarifies the philosophical breakdown of GWT's role versus the developer's role. History is an example of such: although GWT manages history tokens as users click Back or Forward in the browser, it does not detail how to map history tokens to an application state.
GWT applications can be run in two modes:Development mode : The application runs as Java bytecode within the Java Virtual Machine. This mode is typically used for development, supporting the hot swapping of code and debugging. In 2014, the classic implementation of Dev Mode was rendered unusable by browser updates until its replacement with the more compatible Super Dev Mode, which became the default in GWT 2.7.Production mode : The application is run as pure JavaScript and HTML, compiled from the Java source. This mode is typically used for deployment.
Several open-source plugins are available for making GWT development easier with other IDEs, including GWT4NB for NetBeans, Cypal Studio for GWT, and GWT Developer for JDeveloper. The Google Plugin for Eclipse handles most GWT-related tasks in the IDE, including creating projects, invoking the GWT compiler, creating GWT launch configurations, validation, and syntax highlighting.

Components

The major GWT components include:
;GWT Java-to-JavaScript Compiler
;GWT Development Mode
;JRE emulation library
;GWT Web UI class library

Features

  • Dynamic and reusable UI components: programmers can use built-in classes to implement otherwise time-consuming dynamic behaviors, such as drag-and-drop or complex visual tree structures.
  • Simple RPC mechanism
  • Browser history management
  • Support for full-featured Java debugging
  • GWT handles some cross-browser issues for the developer.
  • Unit testing integration
  • Support for Internationalization and localization
  • HTML Canvas support
  • The developers can mix handwritten JavaScript in the Java source code using the JavaScript Native Interface.
  • Support for using Google APIs in GWT applications.
  • Open-source
  • The developers can design and develop their applications in a pure object-oriented fashion since they're using Java. Common JavaScript errors, such as typos and type mismatches, are caught at compile time.
  • The JavaScript that the GWT compiler generates can be tailored to be either unobfuscated and easier to understand or obfuscated and compressed.
  • A number of libraries are available for GWT, by Google and third parties. These extend the toolkit's features.

Available widgets

As of version 2.4, Google Web Toolkit offers several widgets and panels.
WidgetsPanels
ButtonPopupPanel
PushButtonStackPanel
RadioButtonStackLayoutPanel
CheckBoxHorizontalPanel
DatePickerVerticalPanel
ToggleButtonFlowPanel
TextBoxVerticalSplitPanel
PasswordTextBoxHorizontalSplitPanel
TextAreaSplitLayoutPanel
HyperlinkDockPanel
ListBoxDockLayoutPanel
CellListTabPanel
MenuBarTabLayoutPanel
TreeDisclosurePanel
CellTree-
SuggestBox-
RichTextArea-
FlexTable-
Grid-
CellTable-
CellBrowser-
TabBar-
DialogBox-

Many common widgets not found in the GWT have been implemented in third-party libraries.

Enterprise usage

GWT uses or supports Java, Apache Tomcat, Eclipse IDE, Internet Explorer, and internationalization and localization. Java-based GWT rich web applications can be tested using JUnit testing framework and code coverage tools. Because GWT allows compile time verification of images, CSS, and business logic, many common development defects are automatically discovered without requiring the manual testing commonly required by RIAs.
Google has noted that some of its products are GWT-based: Blogger, AdWords, Flights, Wallet, Offers, Groups, Inbox.

GWT 2.0

On December 8, 2009, Google launched Google Web Toolkit 2.0 with Speed Tracer.
Version 2.0 of GWT offers a number of new features, including:
  • In-Browser Development Mode : prior to version 2.0, the hosted mode was used to embed a modified browser to allow running the bytecode version of the application during development. With version 2.0, hosted mode, renamed "development mode", allows using any browser to view the page being debugged through the use of a browser plugin. The plugin communicates with the development mode shell using TCP/IP, which allows cross-platform debugging.
  • Code splitting: with the developer providing "split points" in the source code, the GWT compiler can split the JavaScript code into several small chunks instead of one big download. This will lead to reduced application startup time as the size of the initial download is decreased.
  • Declarative User Interface: using an XML format, the new feature known as UiBinder allows the creation of user interfaces through declaration rather than code. This allows a clean separation of UI construction and behavior implementation.
  • Resource bundling: the ClientBundle interface will allow resources of any nature to be bundled together and transferred in one download, resulting in fewer round-trips to the server and hence lower application latency.
Since the new development mode removed most platform-specific code, the new version will be distributed as a unique archive, instead of one per supported platform, as was the case with previous versions.

Mobile

As a general framework for making web apps, Google Web Toolkit is also capable of being used as a framework for creating mobile and tablet apps, either by making the needed widgets and animations from scratch or by using one of the mobile frameworks for GWT. An HTML5 app written in GWT can have separate views for Tablets and Mobile phones.