SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
GWT 2.0

 Sean C. Sullivan
    OSCON
  July 23, 2010
About me
• write AJAX applications in Java
    • compile to JavaScript
    • open source

http://code.google.com/webtoolkit/
GWT 2.0




released on December 8, 2009
GWT SDK
New features in GWT 2.0


• Development Mode
• Speed Tracer
• Developer guided code splitting
New features in GWT 2.0


• Compiler optimizations
• Draft Compile
• Declarative User Interfaces (UiBinder)
New features in GWT 2.0


• Layout panels
• Bundled resources via ClientBundle
• HtmlUnit for testing
Development Mode
Development Mode
Development Mode
Development Mode
Development Mode
Google Plugin for Eclipse
Google Plugin for Eclipse
Google Plugin for Eclipse
Google Plugin for Eclipse
Layout panels in GWT 2.0


• relies on the browser’s layout engine
• works correctly in browser’s standards
  mode
Layout panels in GWT 2.0


• com.google.gwt.user.client.RootLayoutPanel
• com.google.gwt.user.client.LayoutPanel
• com.google.gwt.user.client.ui.DockLayoutPanel
Layout panels in GWT 2.0


• com.google.gwt.user.client.ui.SplitLayoutPanel
• com.google.gwt.user.client.ui.StackLayoutPanel
• com.google.gwt.user.client.ui.TabLayoutPanel
UiBinder


• declarative layout
• XML
• UiBinder constructs HTML at compile time
UiBinder

<!-- HelloWorld.ui.xml -->


<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'>
  <div>
    Hello, <span ui:field='nameSpan'/>.
  </div>
</ui:UiBinder>
UiBinder
    public class HelloWorld extends Widget {
  interface MyUiBinder extends UiBinder<DivElement, HelloWorld> {}
  private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);

  @UiField SpanElement nameSpan;

    public HelloWorld() {
      // createAndBindUi initializes this.nameSpan
      setElement(uiBinder.createAndBindUi(this));
    }

  public void setName(String name) { nameSpan.setInnerText(name); }
}
UiBinder


• com.google.gwt.uibinder.client.UiBinder
• com.google.gwt.uibinder.client.UiField
ClientBundle

• bundle images, CSS, data, and other
  resources
• For more information, see
  http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html
ClientBundle
Unit testing with GWT 2.0

 As of 2.0, GWTTestCase no longer uses SWT or
 native code. Instead, it uses HtmlUnit as the
 built-in browser. [...] Debugging GWT Tests in
 development mode can be done entirely in a
 Java debugger

                source: google.com
Unit testing with GWT 2.0


 By default, GWT runs HtmlUnit in the Firefox3
 emulation mode



                 source: google.com
Unit testing with GWT 2.0


 Because HtmlUnit is a GUI-less browser, layout
 cannot be tested on HtmlUnit.



                 source: google.com
Unit testing with GWT 2.0

 ... correct tests can sometimes fail on HtmlUnit,
 either because the HtmlUnit support for that
 feature is lacking or because of HtmlUnit’s
 issues with flakiness when running asynchronous
 tests

                 source: google.com
Code splitting

• allows you to chunk your GWT code into
  multiple fragments for faster startup
• aka “developer guided code splitting”
• For more information, see
  http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html
Speed Tracer
Speed Tracer
Speed Tracer
Demo #1


• GWT 2.0
• HTML 5
• WebSockets
Demo #2
What’s new in GWT 2.1


• Data presentation widgets
• Model-View-Presenter framework
• Server-side Speed Traces
Questions?
Thank you
GWT 2.0 - OSCON 2010
GWT 2.0 - OSCON 2010

Contenu connexe

Tendances

CSCW Presentation_collaborative Image Tagging
CSCW Presentation_collaborative Image TaggingCSCW Presentation_collaborative Image Tagging
CSCW Presentation_collaborative Image Tagging
Jay Gou
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
Hyungwook Lee
 

Tendances (16)

The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran Sayed
 
Best Practices - By Lofi Dewanto
Best Practices - By Lofi DewantoBest Practices - By Lofi Dewanto
Best Practices - By Lofi Dewanto
 
Unirex Lean tools By Dario Carotenuto
Unirex Lean tools By Dario CarotenutoUnirex Lean tools By Dario Carotenuto
Unirex Lean tools By Dario Carotenuto
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
CSCW Presentation_collaborative Image Tagging
CSCW Presentation_collaborative Image TaggingCSCW Presentation_collaborative Image Tagging
CSCW Presentation_collaborative Image Tagging
 
Headless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKrakenHeadless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKraken
 
GWTcon 2015 - Best development practices for GWT web applications
GWTcon 2015 - Best development practices for GWT web applications GWTcon 2015 - Best development practices for GWT web applications
GWTcon 2015 - Best development practices for GWT web applications
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
 
UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)UberFire Quick Intro and Overview (early beta Jul 2013)
UberFire Quick Intro and Overview (early beta Jul 2013)
 
Hardware Acceleration in WebKit
Hardware Acceleration in WebKitHardware Acceleration in WebKit
Hardware Acceleration in WebKit
 
The Internal Architecture of Chrome Developer Tools
The Internal Architecture of Chrome Developer ToolsThe Internal Architecture of Chrome Developer Tools
The Internal Architecture of Chrome Developer Tools
 
Chromium contribution
Chromium contributionChromium contribution
Chromium contribution
 
Create rich web stories with Drupal 8 and paragraphs
Create rich web stories with Drupal 8 and paragraphsCreate rich web stories with Drupal 8 and paragraphs
Create rich web stories with Drupal 8 and paragraphs
 
2015: A static site generator odyssey
2015: A static site generator odyssey2015: A static site generator odyssey
2015: A static site generator odyssey
 
Webkit overview
Webkit overviewWebkit overview
Webkit overview
 

Similaire à GWT 2.0 - OSCON 2010

Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
Didier Girard
 
GWT Quick Start
GWT Quick StartGWT Quick Start
GWT Quick Start
Guo Albert
 
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
 

Similaire à GWT 2.0 - OSCON 2010 (20)

GWT_Framework
GWT_FrameworkGWT_Framework
GWT_Framework
 
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
 
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
 
Introduction to Google Web Toolkit - part 1
Introduction to Google Web Toolkit - part 1Introduction to Google Web Toolkit - part 1
Introduction to Google Web Toolkit - part 1
 
How to start with Google Web Toolkit
How to start with Google Web ToolkitHow to start with Google Web Toolkit
How to start with Google Web Toolkit
 
Introduction to Google Web Toolkit
Introduction to Google Web ToolkitIntroduction to Google Web Toolkit
Introduction to Google Web Toolkit
 
Google web toolkit ( Gwt )
 Google web toolkit ( Gwt ) Google web toolkit ( Gwt )
Google web toolkit ( Gwt )
 
Google Web toolkit GWT 2.0 UiBinder Talk @ South Florida Google Technology Us...
Google Web toolkit GWT 2.0 UiBinder Talk @ South Florida Google Technology Us...Google Web toolkit GWT 2.0 UiBinder Talk @ South Florida Google Technology Us...
Google Web toolkit GWT 2.0 UiBinder Talk @ South Florida Google Technology Us...
 
GWT Quick Start
GWT Quick StartGWT Quick Start
GWT Quick Start
 
Coding GRIN GLOBAL Wizards
Coding GRIN GLOBAL WizardsCoding GRIN GLOBAL Wizards
Coding GRIN GLOBAL Wizards
 
Gretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with GradleGretty: Managing Web Containers with Gradle
Gretty: Managing Web Containers with Gradle
 
(ATS4-DEV08) Building Widgets for the Symyx Notebook Home Page
(ATS4-DEV08) Building Widgets for the Symyx Notebook Home Page(ATS4-DEV08) Building Widgets for the Symyx Notebook Home Page
(ATS4-DEV08) Building Widgets for the Symyx Notebook Home Page
 
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
 
Extending GWT
Extending GWTExtending GWT
Extending GWT
 
GWT Introduction and Overview - SV Code Camp 09
GWT Introduction and Overview - SV Code Camp 09GWT Introduction and Overview - SV Code Camp 09
GWT Introduction and Overview - SV Code Camp 09
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Cloud Study Jam_ Google Cloud Essentials Event Slides.pptx
Cloud Study Jam_ Google Cloud Essentials Event Slides.pptxCloud Study Jam_ Google Cloud Essentials Event Slides.pptx
Cloud Study Jam_ Google Cloud Essentials Event Slides.pptx
 
Gwt Presentation 1
Gwt Presentation 1Gwt Presentation 1
Gwt Presentation 1
 
(ATS6-DEV07) Building widgets for ELN home page
(ATS6-DEV07) Building widgets for ELN home page(ATS6-DEV07) Building widgets for ELN home page
(ATS6-DEV07) Building widgets for ELN home page
 
GWT widget development
GWT widget developmentGWT widget development
GWT widget development
 

Plus de sullis

Incremental deployment of new features
Incremental deployment of new featuresIncremental deployment of new features
Incremental deployment of new features
sullis
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
sullis
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
sullis
 

Plus de sullis (20)

Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
Production Ready Web Services with Dropwizard
Production Ready Web Services with DropwizardProduction Ready Web Services with Dropwizard
Production Ready Web Services with Dropwizard
 
Incremental deployment of new features
Incremental deployment of new featuresIncremental deployment of new features
Incremental deployment of new features
 
Comparing JSON Libraries - July 19 2011
Comparing JSON Libraries - July 19 2011Comparing JSON Libraries - July 19 2011
Comparing JSON Libraries - July 19 2011
 
Android - Open Source Bridge 2011
Android - Open Source Bridge 2011Android - Open Source Bridge 2011
Android - Open Source Bridge 2011
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
 
Connecting to Web Services on Android June 2 2010
Connecting to Web Services on Android June 2 2010Connecting to Web Services on Android June 2 2010
Connecting to Web Services on Android June 2 2010
 
Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010Programming WebSockets - April 20 2010
Programming WebSockets - April 20 2010
 
WebDAV - April 15 2008
WebDAV - April 15 2008WebDAV - April 15 2008
WebDAV - April 15 2008
 
Google App Engine - September 17 2009
Google App Engine - September 17 2009Google App Engine - September 17 2009
Google App Engine - September 17 2009
 
Google App Engine - Portland Java User Group - August 18 2009
Google App Engine - Portland Java User Group - August 18 2009Google App Engine - Portland Java User Group - August 18 2009
Google App Engine - Portland Java User Group - August 18 2009
 
Domo Arigato Mr. Roboto - Open Source Bridge 2009
Domo Arigato Mr. Roboto - Open Source Bridge 2009Domo Arigato Mr. Roboto - Open Source Bridge 2009
Domo Arigato Mr. Roboto - Open Source Bridge 2009
 
Java and JSON - UJUG - March 19 2009
Java and JSON - UJUG - March 19 2009Java and JSON - UJUG - March 19 2009
Java and JSON - UJUG - March 19 2009
 
OAuth and REST web services
OAuth and REST web servicesOAuth and REST web services
OAuth and REST web services
 
Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009Introduction to Android - Mobile Fest Singapore 2009
Introduction to Android - Mobile Fest Singapore 2009
 
Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009Web Services and Android - OSSPAC 2009
Web Services and Android - OSSPAC 2009
 
Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009Getting Started with Android - OSSPAC 2009
Getting Started with Android - OSSPAC 2009
 
Connecting to Web Services on Android
Connecting to Web Services on AndroidConnecting to Web Services on Android
Connecting to Web Services on Android
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

GWT 2.0 - OSCON 2010