12
Google Web Toolkit Why this technology is cool ? DNG Consulting http://www.dng-consulting.com v1.0

GWT Introduction for Eclipse Day

Embed Size (px)

DESCRIPTION

This SlideDeck is a short introduction of GWT made for Eclipse Day Toulouse

Citation preview

Page 1: GWT Introduction for Eclipse Day

Google Web Toolkit Why this technology is cool ?

DNG Consultinghttp://www.dng-consulting.com

v1.0

Page 2: GWT Introduction for Eclipse Day

Speaker : Sami JABER – DNG Consulting

DNG Consulting owner & Software Architect

Author of "Programmation GWT 2" published with Eyrolles (next version expected in the coming weeks)

DNG Consulting : IT Consulting & Training & Services company focused on JEE and .NET technologies

Architecture, Google Web Toolkit experts

Rich-Client applications (Java, .NET, …)

We build software for our customers in an agile fashion with the best technologies

2

Page 3: GWT Introduction for Eclipse Day

3

Project history

Initially created by a small team at Google

The beginning : Open Source in 2006

Large community Project hosted at : http://code.google.com/webtoolkit/

Active forums with lot of contributors (gwt-users & gwt-contribs)

Several books in English and French, conferences, ...

More and more applications are migrated in GWT (to convert existing Flash or Silverlight applications)

Version 1.5 downloaded 800.000 times

Version 2.0 shipped in 2010

Version 2.4 shipped in 2012

Page 4: GWT Introduction for Eclipse Day

4

GWT philosophy

For GWT, a Web Developer should not be a Javascript, HTML or CSS Guru

GWT relies on a real component model similar to the way we build « Swing » applications

GWT ensures transparently JS/HTML code generation from Java code

GWT has been designed to be multi-browsers thanks to Deferred Binding technology

JavaScript becomes a kind of Assembly language (it is optimized, obfuscated and compressed)

Page 5: GWT Introduction for Eclipse Day

5

Coding in JavaScript is tricky

Javascript is a script language poorly mastered by most developers (in the other hand, quite everybody know Java)

There is more than hundred different frameworks, which one to use ? JQuery ? Prototype ? Closure ? ExtJS ?

Maintainability of a big application containing tons of JS code can be a nightmare

Technical skills required to master HTML 5JavaScript, DX?HTML (3.2, 4, 5), CSS[1-3], DOM Level[0-3], SVG, Canvas…

Debugging is tricky (specially if we want a real stack trace), complex variable watching not always possible

JavaScript is not natively « Object Oriented »

Page 6: GWT Introduction for Eclipse Day

6

Why GWT is cool ?

Because Java is cool Strongly typed language, Compile Time checking, polymorphism, refactoring, « testability »

ProductivitySimilar to a Swing, Rich-client development

Code completion

PerformancesGenerated JavaScript is optimized, reduced

The framework eliminates JS memory leak

You pay only for what you use (more Java code you have, more the JavaScript will grow) with the help of the Compiler

Page 7: GWT Introduction for Eclipse Day

7

Performances

Page 8: GWT Introduction for Eclipse Day

8

One code generates multiple JS scripts

One JavaCode base

Mycode.java

One code used to generatemultiple JS scripts called

"permutations"

Optimized JavaScriptwithout if/else useragent

Page 9: GWT Introduction for Eclipse Day

9

GWT Components

Checkbox, list, textbox, labels, tree, datagrid, …Similar to what we can see with Swing, SWT

Page 10: GWT Introduction for Eclipse Day

10

Eclipse tooling

Google Plugin for Eclipse allows to easily create and deploy GWT applications

New Web Application Wizard to create a App Engine application

Cloud SQL tooling to use Cloud SQL as a database for your App Engine application, and JPA support for Cloud SQL

Importing the latest Google APIs

Using an App Engine connected Android project to use App Engine as a backend for your Android projects

One-click deploy to App Engine

GWT Designer Assists developers in creating a rich user experience via WYSIWYG

Page 11: GWT Introduction for Eclipse Day

11

Démo

Page 12: GWT Introduction for Eclipse Day

12

Features in the pipe …

New feature (experimental in 2.5) : SuperDevMode

Ability to debug directly the JS generated code

JS Closure Compiler integration :

The generated JavaScript is compiled with Closure (10% more code reduction)

CodeSplitting2 :

Code Fragmentation with optimized leftover fragments

Big applications are better handled by GWT

Bug fixing

Map support in RequestFactory, Safe Styling, …