Google Web Toolkit
Encyclopedia
Google Web Toolkit is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 set of tools
Programming tool
A programming tool or software development tool is a program or application that software developers use to create, debug, maintain, or otherwise support other programs and applications...

 that allows web developer
Web developer
A web developer is a software developer or software engineer who specializes in, or is specifically engaged in, the development of World Wide Web applications, or distributed network applications that are run over HTTP from a web server to a web browser....

s to create and maintain complex JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

 front-end applications in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

. Other than a few native libraries, everything is Java source that can be built on any supported platform with the included GWT Ant
Apache Ant
Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects....

 build files. It is licensed under the Apache License
Apache License
The Apache License is a copyfree free software license authored by the Apache Software Foundation . The Apache License requires preservation of the copyright notice and disclaimer....

 version 2.0.

GWT emphasizes reusable
Reusability
In computer science and software engineering, reusability is the likelihood a segment of source code that can be used again to add new functionalities with slight or no modification...

, efficient solutions to recurring Ajax
Ajax (programming)
Ajax is a group of interrelated web development methods used on the client-side to create asynchronous web applications...

 challenges, namely asynchronous remote procedure calls
Remote procedure call
In computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...

, history management, bookmarking, internationalization and cross-browser
Cross-browser
Cross-browser refers to the ability for a website, web application, HTML construct or client-side script to support all the web browsers. The term cross-browser is often confused with multi-browser...

 portability
Porting
In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...

.

History

GWT version 1.0 RC 1 (build 1.0.20) was released on May 16, 2006. Google announced GWT at the JavaOne
JavaOne
JavaOne is an annual conference inaugurated in 1996 by Sun Microsystems to discuss Java technologies, primarily among Java developers. JavaOne is held in San Francisco, California typically running from Monday to Thursday. Technical sessions on a variety of topics are held during the day. In the...

 conference, 2006.

Release history:
  • GWT 1.0 May 17, 2006
  • GWT 1.1 August 11, 2006
  • GWT 1.2 November 16, 2006
  • GWT 1.3 February 5, 2007
  • GWT 1.4 August 28, 2007
  • GWT 1.5 August 27, 2008
  • GWT 1.6 April 07, 2009
  • GWT 1.7 July 13, 2009
  • GWT 2.0 December 08, 2009
  • GWT 2.0.1 February 02, 2010
  • GWT 2.0.2 February 12, 2010
  • GWT 2.0.3 February 19, 2010
  • GWT 2.0.4 July 02, 2010
  • GWT 2.1.0 October 19, 2010
  • GWT 2.1.1 December 16, 2010
  • GWT 2.2.0 February 11, 2011
  • GWT 2.3.0 May 3, 2011
  • GWT 2.4.0 September 8, 2011 (Latest)


In August 2010, Google acquired Instantiations, a company known for its focus on Eclipse Java developer tools, including GWT Designer, which is now bundled with Google Plugin for Eclipse
Google Plugin for Eclipse
Google Plugin for Eclipse is a set of software development tools that enables Java developers to design, build, optimize, and deploy cloud computing applications. GPE assists developers in creating complex user interfaces, generating Ajax code using the Google Web Toolkit, optimizing performance...

.

Development with GWT

Using GWT, developers can rapidly develop and debug Ajax
Ajax (programming)
Ajax is a group of interrelated web development methods used on the client-side to create asynchronous web applications...

 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
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

 files that are optionally obfuscated and deeply optimized.

GWT does not revolve only around user interface programming; it is a general set of tools for building any sort of high-performance client-side JavaScript functionality. In live presentations, the developers of GWT emphasize that "GWT is not its libraries" and that it only includes a library but is not fundamentally yet another Ajax library. This open-ended philosophy sometimes surprises developers new to GWT who expect it to provide an end-to-end "on rails" application framework. Indeed, many key architectural decisions are left completely 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 prescribe how to map history tokens to an application state.

GWT applications can be run in two modes:
  • Development mode (formerly Hosted mode): The application is run as Java bytecode within the Java Virtual Machine
    Java Virtual Machine
    A Java virtual machine is a virtual machine capable of executing Java bytecode. It is the code execution component of the Java software platform. Sun Microsystems stated that there are over 4.5 billion JVM-enabled devices.-Overview:...

     (JVM). This mode is typically used for development, supporting hot swapping of code and debugging.
  • Production mode (formerly Web 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
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

. E.g., GWT4NB for NetBeans
NetBeans
NetBeans refers to both a platform framework for Java desktop applications, and an integrated development environment for developing with Java, JavaScript, PHP, Python, Groovy, C, C++, Scala, Clojure, and others...

, Cypal Studio for GWT, Eclipse
Eclipse (software)
Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system...

 and JDeveloper
JDeveloper
JDeveloper is a freeware IDE supplied by Oracle Corporation. It offers features for development in Java, XML, SQL and PL/SQL, HTML, JavaScript, BPEL and PHP...

 etc. The Google Plugin for Eclipse
Google Plugin for Eclipse
Google Plugin for Eclipse is a set of software development tools that enables Java developers to design, build, optimize, and deploy cloud computing applications. GPE assists developers in creating complex user interfaces, generating Ajax code using the Google Web Toolkit, optimizing performance...

 handles most GWT related tasks in the IDE, including creating projects, invoking the GWT compiler, creating GWT launch configurations, validations, syntax highlighting, etc.

Components

The major GWT components include:

GWT Java-to-JavaScript Compiler
Translates the Java programming language to the JavaScript programming language.

GWT Development Mode
Allows the developers to run and execute GWT applications in development mode (the app runs as Java in the JVM without compiling to JavaScript). Prior to 2.0, GWT hosted mode provided a special-purpose "hosted browser" to debug your GWT code. In 2.0, the web page being debugged is viewed within a regular browser. Development mode is supported through the use of a native-code plugin called the Google Web Toolkit Developer Plugin for many popular browsers.

JRE emulation library
JavaScript implementations of the commonly used classes in the Java standard class library (such as most of the java.lang package classes and a subset of the java.util package classes).

GWT Web UI class library
A set of custom interfaces and classes for creating widgets.

Features

  • Dynamic and reusable UI components: programmers can use pre-designed classes to implement otherwise time-consuming dynamic behaviors, such as drag-and-drop or sophisticated visual tree structures.
  • Simple RPC
    Remote procedure call
    In computer science, a remote procedure call is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space without the programmer explicitly coding the details for this remote interaction...

     mechanism
  • Browser history management
  • Support for full-featured Java debugging
  • GWT handles some cross-browser issues for the developer.
  • JUnit
    JUnit
    JUnit is a unit testing framework for the Java programming language. JUnit has been important in the development of test-driven development, and is one of a family of unit testing frameworks collectively known as xUnit that originated with SUnit....

     integration
  • Support for Internationalization and localization
    Internationalization and localization
    In computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...

  • HTML Canvas support (subject to API changes)
  • The developers can mix handwritten JavaScript in the Java source code using the JavaScript Native Interface (JSNI).
  • Support for using Google APIs
    Application programming interface
    An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

     in GWT applications (initially, support for Google Gears)
  • Open-source
  • The developers can design and develop their application in a pure object-oriented fashion, since they're using Java (instead of JavaScript). Common JavaScript errors, such as typos and type mismatches
    Type system
    A type system associates a type with each computed value. By examining the flow of these values, a type system attempts to ensure or prove that no type errors can occur...

    , are caught at compile time.
  • The JavaScript that the GWT compiler generates can be tailored to be either unobfuscated and easy to understand or obfuscated and smaller to download.
  • A number of libraries are available for GWT, by Google and third parties. These extend GWT's features.

Available Widgets

As of version 2.0.3 (February 2010), GWT offers several widgets
Widget (computing)
In computer programming, a widget is an element of a graphical user interface that displays an information arrangement changeable by the user, such as a window or a text box. The defining characteristic of a widget is to provide a single interaction point for the direct manipulation of a given...

:
  • Button
  • PushButton
  • RadioButton
  • CheckBox
  • DatePicker
  • ToggleButton
  • TextBox
  • PasswordTextBox
  • TextArea
  • Hyperlink
  • ListBox
  • MenuBar
  • Tree
  • SuggestBox (auto-complete)
  • RichTextArea
  • Table
  • TabBar
  • DialogBox

Available Panels

GWT widgets also include several panels:
  • PopupPanel
  • StackPanel
  • StackLayoutPanel
  • HorizontalPanel
  • VerticalPanel
  • FlowPanel
  • VerticalSplitPanel
  • HorizontalSplitPanel
  • SplitLayoutPanel
  • DockLayoutPanel
  • TabPanel
  • TabLayoutPanel
  • DisclosurePanel


Many common widgets not found in the GWT have been implemented in third-party libraries, such as Ext GWT, GWT Component Library, GWT-Ext, GWT Widget Library, GWTiger, Rocket GWT, Dojo, SmartGWT etc.

GWT 2.0

On Dec 08, 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 (formerly known as Out Of Process Hosted Mode, OOPHM): prior to version 2.0, hosted mode 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 (supported) 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 (for example, debugging in Internet Explorer on Windows from a development mode shell running on a Linux machine).
  • Code splitting: with the developer providing "split points" in the source code, the GWT compiler will be able to 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 clean separation of UI construction and behavior implementation.
  • Resource bundling: the ClientBundle interface will allow resources of any nature (images, CSS, text, binary) 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.

See also

  • Google Plugin for Eclipse
    Google Plugin for Eclipse
    Google Plugin for Eclipse is a set of software development tools that enables Java developers to design, build, optimize, and deploy cloud computing applications. GPE assists developers in creating complex user interfaces, generating Ajax code using the Google Web Toolkit, optimizing performance...

  • Showcase/Live Demo of GWT Features
  • Google Code
    Google Code
    Google Code is Google's site for developer tools, APIs and technical resources. The site contains documentation on using Google developer tools and APIs—including discussion groups and blogs for developers using Google's developer products....

  • Comparison of JavaScript frameworks
    Comparison of JavaScript frameworks
    - Rationale :There are many JavaScript frameworks available. The intention of this comparison is to show some examples of JavaScript frameworks with their different features.- Table of Javascript Frameworks :- External links :* * * * * * * *...

  • Comparison of web application frameworks
    Comparison of web application frameworks
    This is a comparison of notable web application frameworks.-Perl:-PHP:-Java:-Python:-Ruby:-CFML :-ASP.NET:-Other:-ASP.NET:-C++:-CFML:-Python:-Java:-PHP:-Ruby:-Others:...


Other Frameworks

  • GWT-Platform, an annotation based Model-View-Presenter framework for GWT
  • SmartGWT, a GWT framework with a comprehensive widget library and server side databinding capabilities
  • Vaadin
    Vaadin
    Vaadin is an open source Web application framework for rich Internet applications. In contrast to JavaScript libraries and browser-plugin based solutions, it features a server-side architecture, which means that the majority of the logic runs on the servers. Ajax technology is used at the...

    , a similar framework, which is based on GWT
  • Pyjamas
    Pyjamas (software)
    Pyjamas is a tool and framework for developing Ajax applications in Python. It contains a stand-alone Python-to-JavaScript compiler, an Ajax framework and widget toolkit, and through use of these components, developers can write comprehensive applications, to run in all major web browsers, without...

     Pyjamas, a port of GWT to Python
  • RubyJS
    RubyJS
    RubyJS is a port of Google Web Toolkit to the Ruby programming language. RubyJS compiles Ruby source code to JavaScript, which allows running client-side applications in a web browser....

    , a port of GWT to Ruby
  • Microsoft Live Labs Volta
    Microsoft Live Labs Volta
    Volta is an experimental developer toolset for building multi-tier web applications, developed at Microsoft Live Labs. It allows developers to split their application easily into different client and server parts throughout the development lifecycle. Volta integrates with Microsoft Visual Studio...

    , a similar approach from Microsoft
    Microsoft
    Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

  • Wt - Web toolkit
    Wt - Web toolkit
    Wt is an open source widget-centric web application framework for the C++ programming language developed by Emweb. It has an API that resembles the C++ desktop application library Qt, using also a widget tree and event-driven signal/slot programming model....

    , a C++ Web tool kit
  • Morfik
    Morfik
    Morfik Technology Pty Ltd., an Australian company, is the developer of Morfik, a set of visual designers, compilers and a Framework combined in an Integrated development environment aimed at developing Ajax applications in a high-level language such as Java, C#, BASIC or Object Pascal. Morfik...

    , a development tool that compiles C#, Pascal and Basic code to Javascript.
  • SharpKit, a development tool that compiles C# code to Javascript.
  • Script#, an open source development tool that compiles C# code to Javascript.
  • JSIL, an open source development tool that compiles .NET
    .NET Framework
    The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

     CIL
    Common Intermediate Language
    Common Intermediate Language is the lowest-level human-readable programming language defined by the Common Language Infrastructure specification and is used by the .NET Framework and Mono...

     code to Javascript.
  • Real Studio
    REAL Studio
    Real Studio is a programming environment developed andcommercially marketed by Real Software, Inc of Austin, Texasfor Mac OS X, Microsoft Windows, 32-bit x86 Linux and the...

    , Web Edition, builds desktop-style apps that execute on the server but automatically appear in a web browser.
  • ZK
    ZK (framework)
    ZK is an open-source Ajax Web application framework, written in Java, that enables creation of rich graphical user interfaces for Web applications with no JavaScript and little programming knowledge....

    , a similar framework, which is also written in Java.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK