The Google Web Toolkit ( GWT ), or GWT Web Toolkit , is a collection of open source tools that allow web developers to create and maintain complex JavaScript front-end applications in Java. In addition to some original libraries, they are all Java resources that can be built on all supported platforms with the included Ant GWT build file. It is licensed under the Apache License version 2.0.
GWT emphasizes reusable approaches to common web development tasks, namely asynchronous remote procedure calls, history management, bookmarks, UI abstractions, internationalization, and portability between browsers.
Video Google Web Toolkit
Histori
GWT version 1.0 RC 1 was released on May 16, 2006. Google announced GWT at the JavaOne conference, 2006.
In August 2010, Google acquired Instansiasi, a company known for its focus on the 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 has convinced the GWT community that GWT will continue to be supported for the foreseeable future, but also hints at the possible proximity between the two Google approaches to "structured web programming". They also recognize that a number of engineers who previously worked at GWT are now working on Darts.
In 2012 at the annual I/O conference, Google announced that GWT will be converted from Google's project into a fully open-source project. In July 2013, Google posted on the GWT blog that the transformation to the open source project has been completed.
Maps Google Web Toolkit
Development with GWT
By using GWT, developers can develop and debug Ajax applications in the Java language using Java development tools as they choose. When apps are deployed, GWT cross-compiler translates Java applications into stand-alone JavaScript files that are optionally obfuscated and highly optimized. If required, JavaScript can also be embedded directly into Java code, using Java comments.
GWT not only revolves around the programming user interface; this is a common set of tools for building all sorts of high performance client-side JavaScript functions. Indeed, many major architectural decisions are left entirely to developers. The GWT mission statement explains the philosophical details of GWT's role versus the role of the developer. History is such an example: although GWT manages the history token when a user clicks Back or Forward in a browser, it does not prescribe how to map the historical token to the application status.
GWT apps can run in two modes:
- Development mode (formerly Hosted mode ): The application is run as Java bytecode in the Java Virtual Machine (JVM). This mode is usually used for development, it supports hot swapping code and debugging. In 2014, the Dev Mode classic implementation can not be used by browser updates until its replacement with a more compatible Super Dev Mode, which is defaulted on GWT 2.7.
- Production Mode (formerly Web Mode ): The app is run as pure JavaScript and HTML, compiled from a Java source. This mode is usually used for deployment.
Some open-source plugins are available to make GWT development easier with other IDEs, including GWT4NB for NetBeans, Cypal Studio for GWT (Eclipse plugin), and GWT Developer for JDeveloper. Google Plugin for Eclipse takes care of most GWT related tasks within the IDE, including creating projects, invoking GWT compilers, making GWT launch configurations, validation, and syntax highlighting.
Components
The main components of GWT include:
- GWT Java-to-JavaScript Compiler
- Translates the Java programming language into the JavaScript programming language.
- GWT Development Mode
- Allows developers to run and run GWT applications in development mode (apps running as Java in JVM without compiling into JavaScript). Before 2.0, host mode GWT provides a special purpose "host browser" to debug your GWT code. At 2.0, web pages being logged are viewed in a regular browser. Development mode is supported through the use of native-code plugins called Google Web Toolkit Developer Plugin for many popular browsers.
- JRE emulation library
- JavaScript implementation of classes commonly used in standard Java class libraries (such as most java.lang package classes and a subset of java.util package classes).
- GWT Web UI class library
- A set of interfaces and special classes for creating widgets.
Features
- UI components that are dynamic and reusable: programmers can use previously designed classes to implement time-consuming dynamic behaviors, such as drag-and-drop or sophisticated visual tree structures.
- Simple RPC mechanism
- Browser history management
- Support for full-featured Java debugging
- GWT handles some cross-browser issues for developers.
- Integration unit testing
- Support for Internationalization and localization
- Canvas HTML support (depending on API changes)
- Developers can mix JavaScript handwritten in Java source code using JavaScript Native Interface (JSNI).
- Support for using Google API in GWT app (initially, support for Google Gears)
- Open-source
- Developers can design and develop their apps in pure object oriented mode, since they use Java (not JavaScript). Common JavaScript errors, like typos and mismatch types, will be caught at compile time.
- JavaScript generated by GWT compilers can be customized so as not to be easily disguised and easier to understand or obfuscate and smaller to download.
- A number of libraries are available for GWT, by Google and third parties. It extends the GWT feature.
Available widgets
Starting version 2.4 (September 2011), GWT offers several widgets and panels.
Many common widgets not found in GWT have been implemented in third-party libraries, such as Sencha GXT (formerly Ext GWT), GWT Component Library, GWT-Ext, GWT Widget Library, GWTiger, Rocket GWT, Dojo, SmartGWT, etc.
Company usage
GWT uses or supports Java, Apache Tomcat (or similar web containers), Eclipse IDE, Internet Explorer, and internationalization and localization. GWT Java-based RIA can be tested using JUnit testing framework and code coverage tool. Because GWT allows compilation time image verification, CSS, and business logic, many common development defects are automatically found without the need for manual testing that is normally required by RIA.
Google has noted that some of its products are GWT-based: Blogger, AdWords, Flights, Wallet, Offers, Groups, Inbox.
GWT 2.0
On December 08, 2009 Google launched Google Web Toolkit 2.0 with Speed ââTracer.
Version 2.0 GWT offers a number of new features, including:
- In-Browser Development Mode (formerly known as Outbound Mode of Hosted Processes, OOPM): before version 2.0, host mode used to embed a modified browser to allow running bytecode versions of applications during development. With version 2.0, host mode, renamed "development mode", allows any browser use (supported) to view pages that are being debugged, through the use of browser plugins. The plugin communicates with shell development mode using TCP/IP, which allows cross-platform debugging (for example, debugging in Internet Explorer on Windows from shell development modes run on Linux machines).
- Coded: with the developer providing "separate points" in the source code, GWT compilers will be able to split the JavaScript code into small pieces instead of one big download. This will cause the application startup time to decrease as the initial download size decreases.
- Declarative User Interface: using XML format, a new feature known as UiBinder enables the creation of user interfaces via declarations instead of codes. This allows a clean separation of UI construction and behavioral implementation.
- Resource collection: ClientBundle interface will allow any natural resources (images, CSS, text, binaries) to be bundled together and transferred in one download, resulting in fewer trips back and forth to the server and hence lower application latency./li>
Because the new development mode removes most of the specific platform code, the new version will be distributed as a unique archive, not one per supported platform as it was with the previous version.
Mobile
As a common framework for creating web applications, GWT can also be used as a framework for creating mobile apps and tablets, either by creating the necessary widgets and animations from scratch, or by using one of the mobile templates for GWT. HTML5 applications written in GWT can have separate views for Tablet and Mobile phones.
Source of the article : Wikipedia