2. 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
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
3
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)
4
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 5
JavaScript, 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 » 5
6. Why GWT is cool ?
Because Java is cool
Strongly typed language, Compile Time checking, polymorphism,
refactoring, « testability »
Productivity
Similar to a Swing, Rich-client development
Code completion
Performances
Generated 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
6
8. One code generates multiple JS scripts
One code used to generate
multiple JS scripts called
"permutations"
One Java
Code base
Mycode.java
Optimized JavaScript
without if/else useragent
8
9. GWT Components
Checkbox, list, textbox, labels, tree, datagrid, …
Similar to what we can see with Swing, SWT
9
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
10
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, …
12
Hinweis der Redaktion
Entreprise JavaBeans 3.0
Entreprise JavaBeans 3.0
Entreprise JavaBeans 3.0 GWT est une techologie catalysée par AJAX et qui part du principe qu’un développeur Web doit pouvoir concevoir une application AJAX sans être être un expert JavaScript
Entreprise JavaBeans 3.0 Les défaut de JavaScript sont nombreux Maintenabilité difficile Langage dynamique mal maîtrisé par les développpeurs Compétences nécessaires demandées trop importantes pour le commun des mortels
Entreprise JavaBeans 3.0 Entry-Point Classes A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad() method gets called. Source Path Modules can specify which subpackages contain translatable source, causing the named package and its subpackages to be added to the source path. Only files found on the source path are candidates to be translated into JavaScript, making it possible to mix client-side and server-side code together in the same classpath without conflict. When module inherit other modules, their source paths are combined so that each module will have access to the translatable source it requires. Public Path Modules can specify which subpackages are public, causing the named package and its subpackages to be added to the public path. When you compile your application into JavaScript, all the files that can be found on your public path are copied to the module's output directory. The net effect is that user-visible URLs need not include a full package name. When module inherit other modules, their public paths are combined so that each module will have access to the static resources it expects.
Entreprise JavaBeans 3.0 Entry-Point Classes A module entry-point is any class that is assignable to EntryPoint and that can be constructed without parameters. When a module is loaded, every entry point class is instantiated and its EntryPoint.onModuleLoad() method gets called. Source Path Modules can specify which subpackages contain translatable source, causing the named package and its subpackages to be added to the source path. Only files found on the source path are candidates to be translated into JavaScript, making it possible to mix client-side and server-side code together in the same classpath without conflict. When module inherit other modules, their source paths are combined so that each module will have access to the translatable source it requires. Public Path Modules can specify which subpackages are public, causing the named package and its subpackages to be added to the public path. When you compile your application into JavaScript, all the files that can be found on your public path are copied to the module's output directory. The net effect is that user-visible URLs need not include a full package name. When module inherit other modules, their public paths are combined so that each module will have access to the static resources it expects.