ITWissen.info - Tech know how online

Google web toolkit (GWT)

The GoogleWeb Toolkit (GWT) is a web framework for programming web applications in Java. Programming, testing and compiling of the specific application are possible within the development environment of GWT, just as with the creation of conventional Java programs. GWT is not comparable with an applet, but the entire program code is transformed into HTML, Cascading Style Sheet( CSS) and JavaScript. Thus no Java Virtual Machine( JVM) is necessary for the execution any more. GWT was released by Google in 2006 and is available as open source.

Google Web Toolkit distinguishes between the Hosted Mode and the Web Mode. The Hosted Mode supports the debugging of Java applications. These are executed as byte code by the integrated Java Virtual Machine (JVM). In addition an application server (Tomcat) is contained in GWT. The application is programmed in the hosted mode, so that the advantages of the functions for Java debugging can be used. In the Web mode the application is compiled by the integrated GWT compiler in JavaScript, HTML and CSS, so that the user finally only the Web mode version is made available.

Google Web Toolkit (GWT)

Google Web Toolkit (GWT)

The GWT architecture integrates several components:

GWTJava-to-JavaScript Compiler. This component translates the Java program code into JavaScript and is required to ultimately run the application in Web Mode. It creates a static HTML file as a container, but only includes the parts of the framework that are used. The compiler creates a directory for each compiled software module.

GWT Hosted Web Browser. This is a special web browser that allows GWT applications to be displayed in hosted mode.

JRE Emulation Library. This component contains the commonly used Java standard class libraries including the java.lang and java.util packages.

GWT Web UI Class Library. User-defined interfaces and classes are integrated here, which can be used to create web browser widgets such as buttons, text boxes, images and text. The design of the graphical user interface( GUI) can be done similar to the Swing framework.

For client-server communication, Java objects are sent from the client to the server and vice versa via HTTP using the Remote Procedure Call( RPC) server communication method.

The direct use of JavaScript within the original Java program code is possible via the JavaScript Native Interface. This allows, for example, script-specific extensions that are not possible by using the Java library to be created directly in JavaScript.

The GWT development environment consists of Eclipse, GWT-Designer (plugin for Eclipse), NetBeans and IntelliJ IDEA.

GWT considerations

As advantageous is the use of GWT with regard to the following points of view:

  • the web application is not a Java program code or applet and therefore does not require a Java Virtual Machine (JVM),
  • the only requirement at runtime is a browser
  • the programming is similar to the Swing framework
  • a rich development library is available( UI, AJAX, etc.)
  • there is an easy access for Java desktop developers
  • it is open source,
  • Google know-how regarding caching and code optimizations is given,
  • a clear separation of static web content, dynamic user interface and server-side code is possible and
  • there is a large community as well as a good and clear documentation.

On the other hand, the following can be considered as disadvantages

  • the integration into existing infrastructures is rather difficult and
  • the integration of own components is complex.
Informations:
Englisch: Google web toolkit - GWT
Updated at: 29.10.2013
#Words: 549
Links: framework, Java, application (app), applet, program
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024