Javatpoint Logo
Javatpoint Logo

GWT Introduction

GWT is a development toolkit which enables developer to develop internet or web application. GWT insists on reusable approaches to common web-app tasks such as bookmarking, UI abstraction, cross-browser portability etc. It provides features such as:

  • Developer need not to be expert at browser incompatibilities as GWT handles through different binding.
  • GWT is a single code base for client and server.
  • GWT has chosen Java with which development becomes more effective as it provide code navigation, refactoring etc.
  • GWT MVP (Model View Presenter) allows shared working, faster testing with JUnit. The event bus allows many updates in client side application by placing event on the event bus.
  • It allows different Java tools to integrate with it such as hibernate through gilead.

Components of GWT

  • GWT Java-to-JavaScript Compiler: It translates all the Java written code into JavaScript.
  • GWT Development Mode: It allows the developers to run application in development mode i.e. app run in Java without compiling JavaScript. Development mode allows native mode plug-in called Google Web Toolkit Developer Plug-in.
  • JRE emulation library: GWT includes a library that follows the Java runtime library i.e. java.lang, java.lang.annotation, java.math,, java.sql, java.util etc.
  • GWT Web UI class library: For creating a widget GWT consists of set of interface and classes.

Why to use GWT?

  • Performance Gain: In GWT with each new release of the framework developer would be able to get all new features for free. Old files gain new features by just re-compiling such as accessibility support in GWT 1.5.
  • Debugging: We can debug GWT apps just like in Java application, using IDE's Debugger.
  • OOPHM: Out Of Process Hosted Mode(OOPHM) which allows developer to use hosted mode on the different browsers. It allows developer to increase GWT potential such as running Windows in VM, connecting to IE then running on the Hosted Mode.
  • UI Binder: It allows you to design and customize your widgets in an easy and less complex way using XML, HTML, and Java.
  • GWT takes a strong OO(Object Oriented) approach to Software Architecture.

Breakdown of GWT App

GWT Introduction

GWT provides two modes

  1. Development Mode: It provides the facility to debug Java code of the application directly with your Java debugger.
  2. Web Mode: This mode enables the application to be translated into HTML, CSS and JavaScript code which can be directly deployed to a web server.


1. Create a GWT Project Generate the Files and Directories. Google Plugin for Eclipse, GWT command-line tool, webAppCreator in Development Mode.
2. Design the application Basic layout of the application. Language Constraint.
3. Build the User Interface Based on visual design add user interface components. GWT widgets and panels and Root panel.
4. Client side Management Handling events of keyboard and mouse. ClickHandler and KeyPressHandler interfaces.
5. Code functionality (Client Side) Creates and maintains one code for multiple browser implementations. GWT Methods.
6. Debugging Debug the Java code before compiling it into JavaScript. Development Mode.
7. Apply style Enhance the UI by applying CSS which changes style dynamically. Also apply some static element such as images etc. GWT module, GWT themes, Style sheet, GWT methods, automatic resource inclusion.
8. Compile and Deploy Application Compile your Java code into JavaScript and test it in production mode. GWT Compiler.
Next TopicGWT Installation

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA