SlideShare a Scribd company logo
1 of 33
Download to read offline
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

More Related Content

What's hot

WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013Tony Parisi
 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010Nicholas 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 DeliveryRaunak Hajela
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScriptjeresig
 
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-13Fred 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 VersionMurat Doğan
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitAriya Hidayat
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery PluginsMarc Grabanski
 
Deploying JHipster Microservices
Deploying JHipster MicroservicesDeploying JHipster Microservices
Deploying JHipster MicroservicesJoe 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 AppsDoris 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 fatigueTobias 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 AngularJSPhilipp Burgmer
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 

What's hot (20)

Gwt ppt
Gwt pptGwt ppt
Gwt ppt
 
WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013WebGL For Game Development Spring 2013
WebGL For Game Development Spring 2013
 
GWT Reloaded
GWT ReloadedGWT Reloaded
GWT Reloaded
 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010
 
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
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
 
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
 
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...
 
Vuejs getting-started - Extended Version
Vuejs getting-started - Extended VersionVuejs getting-started - Extended Version
Vuejs getting-started - Extended Version
 
GWT and PWA
GWT and PWAGWT and PWA
GWT and PWA
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
 
Deploying JHipster Microservices
Deploying JHipster MicroservicesDeploying JHipster Microservices
Deploying JHipster Microservices
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
 
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
 
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
 
Web Components and PWA
Web Components and PWAWeb Components and PWA
Web Components and PWA
 
[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅[D2 오픈세미나]2.모바일웹디버깅
[D2 오픈세미나]2.모바일웹디버깅
 
Tutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJSTutorial: Develop Mobile Applications with AngularJS
Tutorial: Develop Mobile Applications with AngularJS
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 

Similar to T 0230 Google Wave Powered By Gwt

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/2JooinK
 
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 & GWTManuel 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 platformDidier Girard
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007lucclaes
 
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 ToolkitIMC Institute
 
Web polyglot programming
Web polyglot programmingWeb polyglot programming
Web polyglot programmingDmitry Buzdin
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk GwtChris 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.2Matthew 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 SEAnerazz08
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklum 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 UniverseStefano Di Paola
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWTFrancesca 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-FrameworksThomas Fuchs
 

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
 
GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day GWT Introduction for Eclipse Day
GWT Introduction for Eclipse Day
 
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
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
 
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
 
Google Dev Day2007
Google Dev Day2007Google Dev Day2007
Google Dev Day2007
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
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
 
Web polyglot programming
Web polyglot programmingWeb polyglot programming
Web polyglot programming
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
 
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
 
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
 
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overviewCiklumJavaSat15112011:Andrew Mormysh-GWT features overview
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
 
(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
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
GWT = easy AJAX
GWT = easy AJAXGWT = easy AJAX
GWT = easy AJAX
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
 
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
 
Gwt
GwtGwt
Gwt
 

Recently uploaded

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

T 0230 Google Wave Powered By Gwt

  • 1.
  • 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