SlideShare a Scribd company logo
T 0230 Google Wave Powered By Gwt
Google Wave Client:
Powered by GWT
Adam Schuck
28 May, 2009
Google Wave client
               search     authentication

abuse
                                           access
detection
                                           control
saved
                                           playback
searches
                                           waves
folders
                                           attachments

                                           gadgets

contacts

presence
Outline

 To GWT or not to GWT
 Client architecture
 Changes in GWT
 Improving Gears
 Performance
 Mobile client
 Testability
 UI testing with WebDriver
Wave UI Requirements

 fast!
 stunning!
 think beyond the browser
 optimistic



<Demo>
To GWT or not to GWT

What is GWT?
 Java (compiled to JS)
    use your favourite IDE (Eclipse, IntelliJ)
    can share code between client + server
 Deferred binding
 JavaScript Native Interface (JSNI)




                               ?
To GWT or not to GWT

 Prototype demoed late 2007
 Then: The No. 1 GWT Skeptic: me
 What changed my mind?
 Myth: "Can't build a real app!"
 Mindset: e.g. scrolly, panels




                          ?
Client Architecture

 Bi-directional communication channel
 Protocol compiler
     Generates interfaces, client + server implementations




 Concurrency Control stack
 Other Talks: Extending Wave; Under the Hood
Supported Browsers

   FF3
   Safari
   Chrome

In development:
   IE7
   Android
   iPhone
Evolution of GWT
What was GWT missing, late 2007?

GWT "areas for improvement" late 2007:
  UI code cumbersome
  Cross-browser CSS
  JSON handling heavy-handed
  Debugging environment != browser
  Monolithic compile -> everything downloaded at start
  Mapping from Java <-> JS unclear
  Inefficiencies in compiler
I have to write how much code?

Issue: creating widgets is time-consuming and heavy handed
promptPanel = new DivPanel();
VerticalPanel panel = new VerticalPanel();
HTML heading = new HTML("Identification");
Label lblPrompt = new Label("Please identify me by:");
final RadioButton r1 = new RadioButton("identity",
   "my Google Wave account (" + uName + ")");
Image imgUser = new Image("images/" + uImage);
final RadioButton r2 = new RadioButton("identity",
   "the following name: ");
Image imgBlog = new Image("images/" + blog.getImage());
final TextBox t = new TextBox();
HorizontalPanel hPanel = new HorizontalPanel();
Button btnOk = new Button("OK");
Button btnCancel = new Button("Cancel");

...
I have to write how much code?

Solution: UiBinder (formerly declarative UI)

Templates allow our UI designer to modify the UI directly!

<ui:UiBinder xmlns:ui='urn:ui.com.google.gwt.uibinder'>
 <div>
  Hello, <span ui:field='nameSpan'/>.
 </div>
</ui:UiBinder>

    See: http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder
But most cross-browser bugs are CSS!

Issue: GWT abstracts cross-browser JS quirks, but not CSS
Solution: StyleInjector + CssResource
Provides:
     Validation
     Minification + Image Spriting
     Allows modularization of CSS: download only when needed
     Different CSS for different browsers (compile-time):

@if user.agent safari {
  -webkit-border-radius: 5px;
}

          See: http://code.google.com/p/google-web-toolkit/wiki/CssResource
Inefficient JSON handling

Issue: JSON handling inefficient, requires extra objects
Solution: JavaScriptObject (JSO)
Subclass JavaScriptObject to create an "overlay type"
     avoid using JSONObject: use JSO / StringBuffer

private native void setPayload(String val) /*-{
 this.payload = val;
}-*/;

private native String getPayload() /*-{
 return this.payload;
}-*/;
         See: http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes
Debugging in Eclipse rocks! - but...

Issue: each browser behaves slightly differently to hosted
mode
Solution: Out-of-process Hosted Mode (OOPHM)
   Browser plugin to debug in Eclipse, but run in real browser!
   Firebug only for FF:
       OOPHM allows Java debugging in FF, Safari, IE
       (so far)
   See: http://code.google.com/p/google-web-
   toolkit/wiki/DesignOOPHM

                     <Time for a demo!>
Distribute as a CD-ROM?

Issue: download size >1 MB (pre-gzip) and counting...
Distribute as a CD-ROM? No!

Solution: runAsync (dynamic loading of code)
GWT.runAsync() signals a "cut point" to the GWT compiler:
  Download what you need, when you need it
    Resources (CSS, images, msgs) come with the code that
    uses it
    Automatically handled by GWT compiler!
public void onNewWaveClicked() {
  GWT.runAsync(new RunAsyncCallback() {
   public void onSuccess() {
     WaveCreator.createNewWave();
   }
  });
}

        See: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting
Down and to the right
Where's all the JS coming from?

Issue: need to know what Java causes the most JS

Solution: Story-of-your-Compile (SOYC) reports
   What is it?: Java package to JS breakdown report
   Helped us identify:
       messages too large
       compiled class names
       what's in the initial download
   e.g. before and after messages optimisation project
JSOs cannot implement interfaces

Issue: we need interfaces for our messages, because:
   client + server both have common libraries
   they should be implementation-agnostic

Solution: GWT's SingleJsoImpl
   In order to inline, JSOs cannot have polymorphic dispatch
   SingleJsoImpl: allow at most one JSO class to implement
   any interface
GWT changes summarised

Declarative UI / UiBinder
StyleInjector + CssResource + ClientBundle
JavaScriptObject
OOPHM
runAsync
Story-of-your-Compile (SOYC)
SingleJsoImpl
-XdisableClassMetadata (saved us ~90KB)
Improving the user experience
Improving Gears

 Client-side Thumbnailing
    send thumbnails before image upload
    uses WorkerPool to avoid blocking UI
 Desktop Drag + Drop
 Resumable uploading
Performance

 Startup:
    runAsync
    fast start
    inline images + CSS
    smaller download
    stats collection
    server-side script selection

 Loaded client:
    optimistic UI
    prefetching
    flyweight pattern
Mobile Client

 GWT deferred binding saves the day!
 v1 AJAX only
 iPhone browser always running
    browser starts up faster than native apps
 uses mobile-specific communication channel
 HTML5 / Gears caching: AppCache manifest GWT linker

                <Time for another demo!>
Testing
Testability

 Model View Presenter
 Prefer JUnit tests over GWTTestCase
 Browser automation: WebDriver
WebDriver

 What is it?
   developer-focused tool for browser automation
 Why do we use it?
   native keyboard and mouse events, rather than
   synthesised via JS
 Challenges:
   adopted early by Wave
   incomplete
 Google Wave's commitment
 What's new?
   iPhoneDriver
   RemoteWebdriver on a grid
 <Demo!>
WebDriver Tips

  Avoid xpath: slow (JS on IE), brittle
       rather: ids, names, and sub-dom navigation
  Intent of tests should be clear: use literate programming
  Each UI class has a WebDriver helper class
// Type in some stuff
BlipPanel blip = wavePanel.getFocusedBlip();
Editor editor = blip.getEditor();
editor.type("Do you know your abc?")
   .enter()
   .type("And your alpha beta gamma?")
   .back()
   .type("...?");
editor.check("<p _t='title'>Do you know your abc?</p>" +
         "<p>And your alpha beta gamma...?|</p>");
// This will cause a contacts popup
blip.clickSubmit();
assertEquals("Do you know your abc?", wavePanel.getTitle());
Summary

To GWT or not to GWT?
Client architecture
Changes in GWT
Improving Gears
Performance
Mobile client
Testability
UI testing with WebDriver
Thanks! Questions?

Feedback please! http://haveasec.com/io
T 0230 Google Wave Powered By Gwt
Ad

More Related Content

What's hot (20)

Gwt ppt
Gwt pptGwt ppt
Gwt ppt
Monica Bubna
 
WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013
Tony Parisi
 
GWT Reloaded
GWT ReloadedGWT Reloaded
GWT Reloaded
Marcin Szałomski
 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010
Nicholas Zakas
 
Amp by Google: The Present And Future Of Quick Content Delivery
Amp by Google: The Present And Future Of Quick Content DeliveryAmp by Google: The Present And Future Of Quick Content Delivery
Amp by Google: The Present And Future Of Quick Content Delivery
Raunak Hajela
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
jeresig
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
MarcinStachniuk
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
Murat Doğan
 
GWT and PWA
GWT and PWAGWT and PWA
GWT and PWA
Manuel Carrasco Moñino
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
Marc Grabanski
 
Deploying JHipster Microservices
Deploying JHipster MicroservicesDeploying JHipster Microservices
Deploying JHipster Microservices
Joe Kutner
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
Doris Chen
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Tobias Braner
 
Web Components and PWA
Web Components and PWAWeb Components and PWA
Web Components and PWA
Manuel Carrasco Moñino
 
[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅
NAVER D2
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
Philipp Burgmer
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
David Amend
 
WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013
Tony Parisi
 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010
Nicholas Zakas
 
Amp by Google: The Present And Future Of Quick Content Delivery
Amp by Google: The Present And Future Of Quick Content DeliveryAmp by Google: The Present And Future Of Quick Content Delivery
Amp by Google: The Present And Future Of Quick Content Delivery
Raunak Hajela
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
jeresig
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer
 
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
Java Web Start czyli jak żyć z tą dziwną technologią? & Continuous Delivery w...
MarcinStachniuk
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
Murat Doğan
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
Marc Grabanski
 
Deploying JHipster Microservices
Deploying JHipster MicroservicesDeploying JHipster Microservices
Deploying JHipster Microservices
Joe Kutner
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
Doris Chen
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Tobias Braner
 
[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅
NAVER D2
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
Philipp Burgmer
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
David Amend
 

Similar to T 0230 Google Wave Powered By Gwt (20)

Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
JooinK
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
DNG Consulting
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
Manuel Carrasco Moñino
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
rajakumar.tu
 
GWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformGWT + Gears : The browser is the platform
GWT + Gears : The browser is the platform
Didier Girard
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007
lucclaes
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
Software Park Thailand
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
IMC Institute
 
Web polyglot programming
Web polyglot programmingWeb polyglot programming
Web polyglot programming
Dmitry Buzdin
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
Chris Schalk
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
Matthew McCullough
 
Google Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEAGoogle Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEA
nerazz08
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Ciklum Ukraine
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
Stefano Di Paola
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
Manuel Carrasco Moñino
 
GWT = easy AJAX
GWT = easy AJAXGWT = easy AJAX
GWT = easy AJAX
Olivier Gérardin
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
Francesca Tosi
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
JooinK
 
Zepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-FrameworksZepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-Frameworks
Thomas Fuchs
 
Gwt
GwtGwt
Gwt
Ankul Rastogi
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
JooinK
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
DNG Consulting
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
Manuel Carrasco Moñino
 
GWT + Gears : The browser is the platform
GWT + Gears : The browser is the platformGWT + Gears : The browser is the platform
GWT + Gears : The browser is the platform
Didier Girard
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007
lucclaes
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
IMC Institute
 
Web polyglot programming
Web polyglot programmingWeb polyglot programming
Web polyglot programming
Dmitry Buzdin
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
Chris Schalk
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
Matthew McCullough
 
Google Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEAGoogle Web Toolkit Introduction - eXo Platform SEA
Google Web Toolkit Introduction - eXo Platform SEA
nerazz08
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Ciklum Ukraine
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
Stefano Di Paola
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
Francesca Tosi
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
JooinK
 
Zepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-FrameworksZepto and the rise of the JavaScript Micro-Frameworks
Zepto and the rise of the JavaScript Micro-Frameworks
Thomas Fuchs
 
Ad

Recently uploaded (20)

Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Ad

T 0230 Google Wave Powered By Gwt

  • 2. Google Wave Client: Powered by GWT Adam Schuck 28 May, 2009
  • 3. Google Wave client search authentication abuse access detection control saved playback searches waves folders attachments gadgets contacts presence
  • 4. Outline To GWT or not to GWT Client architecture Changes in GWT Improving Gears Performance Mobile client Testability UI testing with WebDriver
  • 5. Wave UI Requirements fast! stunning! think beyond the browser optimistic <Demo>
  • 6. To GWT or not to GWT What is GWT? Java (compiled to JS) use your favourite IDE (Eclipse, IntelliJ) can share code between client + server Deferred binding JavaScript Native Interface (JSNI) ?
  • 7. To GWT or not to GWT Prototype demoed late 2007 Then: The No. 1 GWT Skeptic: me What changed my mind? Myth: "Can't build a real app!" Mindset: e.g. scrolly, panels ?
  • 8. Client Architecture Bi-directional communication channel Protocol compiler Generates interfaces, client + server implementations Concurrency Control stack Other Talks: Extending Wave; Under the Hood
  • 9. Supported Browsers FF3 Safari Chrome In development: IE7 Android iPhone
  • 11. What was GWT missing, late 2007? GWT "areas for improvement" late 2007: UI code cumbersome Cross-browser CSS JSON handling heavy-handed Debugging environment != browser Monolithic compile -> everything downloaded at start Mapping from Java <-> JS unclear Inefficiencies in compiler
  • 12. I have to write how much code? Issue: creating widgets is time-consuming and heavy handed promptPanel = new DivPanel(); VerticalPanel panel = new VerticalPanel(); HTML heading = new HTML("Identification"); Label lblPrompt = new Label("Please identify me by:"); final RadioButton r1 = new RadioButton("identity", "my Google Wave account (" + uName + ")"); Image imgUser = new Image("images/" + uImage); final RadioButton r2 = new RadioButton("identity", "the following name: "); Image imgBlog = new Image("images/" + blog.getImage()); final TextBox t = new TextBox(); HorizontalPanel hPanel = new HorizontalPanel(); Button btnOk = new Button("OK"); Button btnCancel = new Button("Cancel"); ...
  • 13. I have to write how much code? Solution: UiBinder (formerly declarative UI) Templates allow our UI designer to modify the UI directly! <ui:UiBinder xmlns:ui='urn:ui.com.google.gwt.uibinder'> <div> Hello, <span ui:field='nameSpan'/>. </div> </ui:UiBinder> See: http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder
  • 14. But most cross-browser bugs are CSS! Issue: GWT abstracts cross-browser JS quirks, but not CSS Solution: StyleInjector + CssResource Provides: Validation Minification + Image Spriting Allows modularization of CSS: download only when needed Different CSS for different browsers (compile-time): @if user.agent safari { -webkit-border-radius: 5px; } See: http://code.google.com/p/google-web-toolkit/wiki/CssResource
  • 15. Inefficient JSON handling Issue: JSON handling inefficient, requires extra objects Solution: JavaScriptObject (JSO) Subclass JavaScriptObject to create an "overlay type" avoid using JSONObject: use JSO / StringBuffer private native void setPayload(String val) /*-{ this.payload = val; }-*/; private native String getPayload() /*-{ return this.payload; }-*/; See: http://code.google.com/p/google-web-toolkit/wiki/OverlayTypes
  • 16. Debugging in Eclipse rocks! - but... Issue: each browser behaves slightly differently to hosted mode Solution: Out-of-process Hosted Mode (OOPHM) Browser plugin to debug in Eclipse, but run in real browser! Firebug only for FF: OOPHM allows Java debugging in FF, Safari, IE (so far) See: http://code.google.com/p/google-web- toolkit/wiki/DesignOOPHM <Time for a demo!>
  • 17. Distribute as a CD-ROM? Issue: download size >1 MB (pre-gzip) and counting...
  • 18. Distribute as a CD-ROM? No! Solution: runAsync (dynamic loading of code) GWT.runAsync() signals a "cut point" to the GWT compiler: Download what you need, when you need it Resources (CSS, images, msgs) come with the code that uses it Automatically handled by GWT compiler! public void onNewWaveClicked() { GWT.runAsync(new RunAsyncCallback() { public void onSuccess() { WaveCreator.createNewWave(); } }); } See: http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting
  • 19. Down and to the right
  • 20. Where's all the JS coming from? Issue: need to know what Java causes the most JS Solution: Story-of-your-Compile (SOYC) reports What is it?: Java package to JS breakdown report Helped us identify: messages too large compiled class names what's in the initial download e.g. before and after messages optimisation project
  • 21. JSOs cannot implement interfaces Issue: we need interfaces for our messages, because: client + server both have common libraries they should be implementation-agnostic Solution: GWT's SingleJsoImpl In order to inline, JSOs cannot have polymorphic dispatch SingleJsoImpl: allow at most one JSO class to implement any interface
  • 22. GWT changes summarised Declarative UI / UiBinder StyleInjector + CssResource + ClientBundle JavaScriptObject OOPHM runAsync Story-of-your-Compile (SOYC) SingleJsoImpl -XdisableClassMetadata (saved us ~90KB)
  • 23. Improving the user experience
  • 24. Improving Gears Client-side Thumbnailing send thumbnails before image upload uses WorkerPool to avoid blocking UI Desktop Drag + Drop Resumable uploading
  • 25. Performance Startup: runAsync fast start inline images + CSS smaller download stats collection server-side script selection Loaded client: optimistic UI prefetching flyweight pattern
  • 26. Mobile Client GWT deferred binding saves the day! v1 AJAX only iPhone browser always running browser starts up faster than native apps uses mobile-specific communication channel HTML5 / Gears caching: AppCache manifest GWT linker <Time for another demo!>
  • 28. Testability Model View Presenter Prefer JUnit tests over GWTTestCase Browser automation: WebDriver
  • 29. WebDriver What is it? developer-focused tool for browser automation Why do we use it? native keyboard and mouse events, rather than synthesised via JS Challenges: adopted early by Wave incomplete Google Wave's commitment What's new? iPhoneDriver RemoteWebdriver on a grid <Demo!>
  • 30. WebDriver Tips Avoid xpath: slow (JS on IE), brittle rather: ids, names, and sub-dom navigation Intent of tests should be clear: use literate programming Each UI class has a WebDriver helper class // Type in some stuff BlipPanel blip = wavePanel.getFocusedBlip(); Editor editor = blip.getEditor(); editor.type("Do you know your abc?") .enter() .type("And your alpha beta gamma?") .back() .type("...?"); editor.check("<p _t='title'>Do you know your abc?</p>" + "<p>And your alpha beta gamma...?|</p>"); // This will cause a contacts popup blip.clickSubmit(); assertEquals("Do you know your abc?", wavePanel.getTitle());
  • 31. Summary To GWT or not to GWT? Client architecture Changes in GWT Improving Gears Performance Mobile client Testability UI testing with WebDriver
  • 32. Thanks! Questions? Feedback please! http://haveasec.com/io