0% found this document useful (0 votes)
97 views5 pages

Google Web Toolkit

Google Web Toolkit (GWT) is an open-source set of tools that allows web developers to create complex JavaScript front-end applications in Java. It was initially released in 2006 and the latest stable release is version 2.8.1 from April 2017. GWT compiles Java code into optimized JavaScript that can run across browsers. It provides features like asynchronous remote procedure calls, history management, internationalization, and cross-browser portability.

Uploaded by

sunny sammy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views5 pages

Google Web Toolkit

Google Web Toolkit (GWT) is an open-source set of tools that allows web developers to create complex JavaScript front-end applications in Java. It was initially released in 2006 and the latest stable release is version 2.8.1 from April 2017. GWT compiles Java code into optimized JavaScript that can run across browsers. It provides features like asynchronous remote procedure calls, history management, internationalization, and cross-browser portability.

Uploaded by

sunny sammy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

.

​Google​ ​Web​ ​Toolkit

● Initial​ ​release​ ​-​ ​May​ ​16,​ ​2006


● Stable​ ​release​​ ​-​ ​V2.8.1​ ​/​ ​April​ ​24,​ ​2017;
● Written​ ​in​​ ​Java
● Operating​ ​system​​ ​-​ ​Linux​,​ ​Windows​,​ ​OS​ ​X​,​ ​FreeBSD

Google​ ​Web​ ​Toolkit​​ ​(​GWT​​ ​)​ ​ ​is​ ​an​​ ​open​ ​source​​ ​set​ ​of​​ ​tools​​ ​that​ ​allows​​ ​web​ ​developers​​ ​to
create​ ​and​ ​maintain​ ​complex​​ ​JavaScript​​ ​front-end​​ ​applications​ ​in​​ ​Java​.​ ​Other​ ​than​ ​a​ ​few​ ​native
libraries,​ ​everything​ ​is​ ​Java​ ​source​ ​that​ ​can​ ​be​ ​built​ ​on​ ​any​ ​supported​ ​platform​ ​with​ ​the​ ​included
GWT​​ ​Ant​​ ​build​ ​files.​ ​It​ ​is​ ​licensed​ ​under​ ​the​​ ​Apache​ ​License​​ ​version​ ​2.0.​[2]

GWT​ ​emphasizes​​ ​reusable​​ ​approaches​ ​to​ ​common​ ​web​ ​development​ ​tasks,​ ​namely
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,​ ​2006

● 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​.

● In​ ​2011​ ​with​ ​the​ ​introduction​ ​of​ ​the​​ ​Dart​ ​programming​ ​language​,​ ​Google​ ​has​ ​reassured
the​ ​GWT​ ​community​ ​that​ ​GWT​ ​will​ ​continue​ ​to​ ​be​ ​supported​ ​for​ ​the​ ​foreseeable​ ​future,
but​ ​also​ ​hinted​ ​at​ ​a​ ​possible​ ​rapprochement​ ​between​ ​the​ ​two​ ​Google​ ​approaches​ ​to
"structured​ ​web​ ​programming".​ ​They've​ ​also​ ​admitted​ ​however​ ​that​ ​a​ ​number​ ​of
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​ ​complete.
Development​ ​with​ ​GWT

​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​Using​ ​GWT,​ ​developers​ ​can​ ​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​ ​general​ ​set​ ​of
tools​ ​for​ ​building​ ​any​ ​sort​ ​of​ ​high-performance​ ​client-side​ ​JavaScript​ ​functionality.​ ​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​ H ​ osted​ ​mode​):​ ​The​ ​application​ ​is​ ​run​ ​as​ ​Java​ ​bytecode
within​ ​the​​ ​Java​ ​Virtual​ ​Machine​​ ​(JVM).​[11]​​ ​This​ ​mode​ ​is​ ​typically​ ​used​ ​for​ ​development,
supporting​​ ​hot​ ​swapping​ ​of​ ​code​​ ​and​ ​debugging.

● Production​ ​mode​ ​(formerly​ W ​ eb​ ​mode​):​ ​The​ ​application​ ​is​ ​run​ ​as​ ​pure​ ​JavaScript​ ​and
HTML,​ ​compiled​ ​from​ ​the​ ​Java​ ​source.​ ​This​ ​mode​ ​is​ ​typically​ ​used​ ​for​ ​deployment.

Components

The​ ​major​ ​GWT​ ​components​ ​include:

1. GWT​ ​Java-to-JavaScript​ ​Compiler


​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​Translates​ ​the​ ​Java​ ​programming​ ​language​ ​to​ ​the​ ​JavaScript
programming​ ​language.

​ ​ ​ ​ ​ ​ ​ ​2.​ ​ ​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.

​ ​ ​ ​ ​ ​ ​ ​3.​ ​ ​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).

​ ​ ​ ​ ​ ​ ​ ​4.GWT​ ​Web​ ​UI​ ​class​ ​library


​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​A​ ​set​ ​of​ ​custom​ ​interfaces​ ​and​ ​classes​ ​for​ ​creating​​ ​widgets​.

​ ​ ​ ​ ​ ​Widgets​ ​like​ ​ ​ ​Button,​ ​PushButton,​ ​RadioButton,​ ​CheckBox,​ ​ToggleButton,​ ​TextBox,


PasswordTextBox,​ ​TextArea,​ ​Hyperlink,​ ​ListBox​ ​etc.,.

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​ ​Procedural​ ​Call)​ ​ ​mechanism
● Browser​ ​history​ ​management
● Support​ ​for​ ​full-featured​ ​Java​ ​debugging
● GWT​ ​handles​ ​some​ ​cross-browser​ ​issues​ ​for​ ​the​ ​developer.
● Support​ ​for​​ ​Internationalization​ ​and​ ​localization
● HTML​ ​Canvas​ ​support​ ​(subject​ ​to​ ​API​ ​changes)​[20]
● The​ ​developers​ ​can​ ​mix​ ​handwritten​ ​JavaScript​ ​in​ ​the​ ​Java​ ​source​ ​code​ ​using​ ​the
JavaScript​ ​Native​ ​Interface​ ​(JSNI).
● Support​ ​for​ ​using​ ​Google​​ ​APIs​​ ​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​,​ ​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​ ​smaller​ ​to​ ​download.
● A​ ​number​ ​of​ ​libraries​ ​are​ ​available​ ​for​ ​GWT,​ ​by​ ​Google​ ​and​ ​third​ ​parties.​ ​These​ ​extend
GWT's​ ​features.
Enterprise​ ​usage

GWT​ ​uses​ ​or​ ​supports​​ ​Java​,​ ​Apache​ ​Tomcat​​ ​(or​ ​similar​ ​web​ ​container),​​ ​Eclipse​ ​IDE​,
Internet​ ​Explorer​,and​​ ​Internationalization​ ​and​ ​Localization​.​ ​Java-based​ ​GWT​​ ​RIAs​​ ​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​ ​need​ ​of​ ​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​ ​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.

Mobile

As​ ​a​ ​general​ ​framework​ ​for​ ​making​ ​web​ ​apps,​ ​GWT​ ​is​ ​also​ ​capable​ ​of​ ​being​ ​used​ ​as​ ​a
framework​ ​for​ ​making​ ​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.
Some​ ​of​ ​the​ ​most​ ​common​ ​mobile​ ​GWT​ ​libraries

● GwtMobile
● gwt-mobile-webkit
● jqm4gwt
● m-gwt
● gwtbootstrap3

You might also like