GWT 2.0 - December 15 2009

  • 1,500 views
Uploaded on

GWT 2.0 …

GWT 2.0
December 15 2009
Portland Java User Group

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,500
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
36
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. GWT 2.0 Sean C. Sullivan Portland Java User Group December 15, 2009
  • 2. • write AJAX applications in Java • compile to JavaScript • open source http://code.google.com/webtoolkit/
  • 3. GWT 2.0 released on December 8, 2009
  • 4. GWT SDK
  • 5. New features in GWT 2.0 • Development Mode • Speed Tracer • Developer guided code splitting
  • 6. New features in GWT 2.0 • Compiler optimizations • Draft Compile • Declarative User Interfaces (UiBinder)
  • 7. New features in GWT 2.0 • Layout panels • Bundled resources via ClientBundle • HtmlUnit for testing
  • 8. Development Mode
  • 9. Development Mode
  • 10. Development Mode
  • 11. Development Mode
  • 12. Development Mode
  • 13. Google Plugin for Eclipse
  • 14. Google Plugin for Eclipse
  • 15. Google Plugin for Eclipse
  • 16. Google Plugin for Eclipse
  • 17. Layout panels in GWT 2.0 • relies on the browser’s layout engine • works correctly in browser’s standards mode
  • 18. 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
  • 19. 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
  • 20. UiBinder • declarative layout • XML • UiBinder constructs HTML at compile time
  • 21. UiBinder <!-- HelloWorld.ui.xml --> <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'>   <div>     Hello, <span ui:field='nameSpan'/>.   </div> </ui:UiBinder>
  • 22. UiBinder • com.google.gwt.uibinder.client.UiBinder • com.google.gwt.uibinder.client.UiField
  • 23. 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); } }
  • 24. ClientBundle • bundle images, CSS, data, and other resources • For more information, see http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html
  • 25. ClientBundle
  • 26. 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
  • 27. Unit testing with GWT 2.0 By default, GWT runs HtmlUnit in the Firefox3 emulation mode source: google.com
  • 28. Unit testing with GWT 2.0 Because HtmlUnit is a GUI-less browser, layout cannot be tested on HtmlUnit. source: google.com
  • 29. 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
  • 30. 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
  • 31. Speed Tracer
  • 32. Speed Tracer
  • 33. Speed Tracer
  • 34. Demo
  • 35. Questions?