Your SlideShare is downloading. ×
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

CiklumJavaSat15112011:Andrew Mormysh-GWT features overview

622
views

Published on

Published in: Technology, News & Politics

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
622
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
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 Features Overview
    Andrey Mormysh
    Java Developer
    a.mormysh@gmail.com
    October 15, 2011
    www.ExigenServices.com
  • 2. GWT
    Google Web Toolkit
  • 3. GWT/ˈɡwɪt /
    Google Web Toolkit
  • 4. GWT-based projects
  • 5. GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
  • GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
    • 6. Odnoklassniki (http://www.odnoklassniki.ru) - social network
  • GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
    • 7. Odnoklassniki (http://www.odnoklassniki.ru) - social network
    • 8. Google Moderator (http://www.google.com/moderator) - a tool that allows distributed communities to submit and vote on questions for talks, presentations and events
  • GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
    • 9. Odnoklassniki (http://www.odnoklassniki.ru) - social network
    • 10. Google Moderator (http://www.google.com/moderator) - a tool that allows distributed communities to submit and vote on questions for talks, presentations and events
    • 11. Go Grid (http://www.gogrid.com/) - cloud computing infrastructure service provider which enables you to deploy and scale load-balanced cloud server networks via a unique multi-server control panel.
  • GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
    • 12. Odnoklassniki (http://www.odnoklassniki.ru) - social network
    • 13. Google Moderator (http://www.google.com/moderator) - a tool that allows distributed communities to submit and vote on questions for talks, presentations and events
    • 14. Go Grid (http://www.gogrid.com/) - cloud computing infrastructure service provider which enables you to deploy and scale load-balanced cloud server networks via a unique multi-server control panel.
    • 15. Blueprint (https://blueprint.lombardi.com/index.html) - business process mapping tool
  • GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
    • 16. Odnoklassniki (http://www.odnoklassniki.ru) - social network
    • 17. Google Moderator (http://www.google.com/moderator) - a tool that allows distributed communities to submit and vote on questions for talks, presentations and events
    • 18. Go Grid (http://www.gogrid.com/) - cloud computing infrastructure service provider which enables you to deploy and scale load-balanced cloud server networks via a unique multi-server control panel.
    • 19. Blueprint (https://blueprint.lombardi.com/index.html) - business process mapping tool
    • 20. Scenechronize (https://www.scenechronize.com/) -a production management web application for film, television and commercials
  • GWT-based projects
    • Google Wave (http://wave.google.com/) - an online tool for real-time communication and collaboration
    • 21. Odnoklassniki (http://www.odnoklassniki.ru) - social network
    • 22. Google Moderator (http://www.google.com/moderator) - a tool that allows distributed communities to submit and vote on questions for talks, presentations and events
    • 23. Go Grid (http://www.gogrid.com/) - cloud computing infrastructure service provider which enables you to deploy and scale load-balanced cloud server networks via a unique multi-server control panel.
    • 24. Blueprint (https://blueprint.lombardi.com/index.html) - business process mapping tool
    • 25. Scenechronize (https://www.scenechronize.com/) -a production management web application for film, television and commercials
    • 26. Whirled (http://www.whirled.com/) -social virtual world website which includes multi-player games
    • 27. etc…
  • Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 28. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 29. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 30. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 31. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 32. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 33. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 34. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 35. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 36. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 37. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 38. Features
    Cross-browser
    Object-oriented programming
    Dev-mode
    GUI debugging
    Wigets and declarative UI
    Client Bundle
    Simple localization
    Code optimization
    Code splitting
    RPC, JSON/XML
    UI Designer
    HTML5

  • 39. ?
  • 40.
  • 41.
  • 42. JSNI
    Java Script Native Interface
    Access JS code from Java code and vice versa
  • 43. JSNI
    Java Script Native Interface
    Access JS code from Java code and vice versa
    Wrap your own or third-party JS-widgets with JSNI:
  • JSNI
    Java Script Native Interface
    Access JS code from Java code and vice versa
    Wrap your own or third-party JS-widgets with JSNI:
    Example 1:
    public static native void alert(String msg)
    /*-{
    $wnd.alert(msg);
    }-*/;
  • 48. JSNI
    Example 2:
    package mypackage;
    public MyClass{
    public static int foo()
    { ... }   
    public static native void exportStaticMethod()
    /*-{
    $wnd.foo = $entry(@mypackage.MyClass::foo());
    }-*/;
    }
  • 49. Deferred binding
    It is a pluggable compile-time type substitution and code generation mechanism.
  • 50. Deferred binding
    It is a pluggable compile-time type substitution and code generation mechanism.
    Example:
    Static binding
    Foo f = new Foo();
     
    Dynamic Binding
    Class c = Class.forName(fooImplName);
    Foo f = (Foo) c.newInstance();
     
    Deferred Binding
    Foo f = (Foo) GWT.create(Foo.class);
  • 51. Deferred binding
    Goal - send exactly the right code to client, depending on
  • Deferred binding
    Goal - send exactly the right code to client, depending on
    Facilities
    • Make fewer Http Requests
    • 60. Eliminate dead code
    • 61. Avoid polymorphic dispatch
    • 62. Avoid synchronous XHR
    • 63. Avoid spaghetti code (if-s in JS-code)
    • 64. Try to use only inline code “elem.innerText = str”
    • 65. etc.
  • Permutations
  • 66. Permutations
    Example:
    Input:
    DOMImpl dom = GWT.create(DOMImpl.class);
  • 67. Permutations
    Example:
    Input:
    DOMImpl dom = GWT.create(DOMImpl.class);
    Implementations:
    DOMImplInternetExplorer
    DOMImplMozilla
    DOMImplOpera
      Property:
    user_agent = “IE”
  • 68. Permutations
    Example:
    Input:
    DOMImpl dom = GWT.create(DOMImpl.class);
    Implementations:
    DOMImplInternetExplorer
    DOMImplMozilla
    DOMImplOpera
      Property:
    user_agent = “IE”
    Output:
    DOM dom = new DOMImplInternetExplorer();
  • 69. Permutations
    Example:
  • 70. Perfect Caching
  • 71. Perfect Caching
    Bootstrap selection script loads Javascript ‘executable’ containing correct set of bindings for given request.
     
    <module>.nocache.js - small
    <md5>.cache.js – big
  • 72. Perfect Caching
    Bootstrap selection script loads Javascript ‘executable’ containing correct set of bindings for given request.
     
    <module>.nocache.js - small
    <md5>.cache.js – big
     
    Apache HTTP server .htaccess configuration:
     
    <Files *.nocache.*>
    ExpiresActive on
    ExpiresDefault "now"
    Header merge Cache-Control "public, max-age=0, must-revalidate"
    </Files>
    <Files *.cache.*>
    ExpiresActive on
    ExpiresDefault "now plus 1 year"
    </Files>
  • 73. Monilithic Compilation
  • 74. Monilithic Compilation
    “The fastest code that which does not run”,
    --Joel Webber, GWT co-creator
  • 75. Monilithic Compilation
    “The fastest code that which does not run”,
    --Joel Webber, GWT co-creator
    Example:
    Shape shape = new Square(4);
    1) int area = shape.getArea();
  • 76. Monilithic Compilation
    “The fastest code that which does not run”,
    --Joel Webber, GWT co-creator
    Example:
    Shape shape = new Square(4);
    1) int area = shape.getArea();
    2) int area = Shape_getArea(shape);
  • 77. Monilithic Compilation
    “The fastest code that which does not run”,
    --Joel Webber, GWT co-creator
    Example:
    Shape shape = new Square(4);
    1) int area = shape.getArea();
    2) int area = Shape_getArea(shape);
    3) int area = shape.len * shape.len;
  • 78. Monilithic Compilation
    “The fastest code that which does not run”,
    --Joel Webber, GWT co-creator
    Example:
    Shape shape = new Square(4);
    1) int area = shape.getArea();
    2) int area = Shape_getArea(shape);
    3) int area = shape.len * shape.len;
    4) int area = 16;
  • 79. Image Bundling
  • 80. Image Bundling
    Problem:
    HTTP 1.1 limit: 2 outgoing connections per domain/port
  • 81. Image Bundling
    Problem:
    HTTP 1.1 limit: 2 outgoing connections per domain/port
    HTTP request has to be sent to the server for each resource (e.g. image)
  • 82. Image Bundling
    Problem:
    HTTP 1.1 limit: 2 outgoing connections per domain/port
    HTTP request has to be sent to the server for each resource (e.g. image)
    Request for status 304 ("Not Modified")
  • 83. Image Bundling
    Solution:
    interface Resources extends ClientBundle {
    @Source("logo.png")
    ImageResource logo();
     
    @Source("arrow.png")
    @ImageOptions(flipRtl = true)
    ImageResource pointer();
    }
     
  • 84. Image Bundling
    Solution:
    interface Resources extends ClientBundle {
    @Source("logo.png")
    ImageResource logo();
     
    @Source("arrow.png")
    @ImageOptions(flipRtl = true)
    ImageResource pointer();
    }
     
    Resources resources = GWT.create(Resources.class);
    Image img = new Image(resources.logo());
  • 85. Code Splitting
    public class Hello implements EntryPoint {
    public void onModuleLoad() {
    Button b = new Button("Click me", new ClickHandler() {
    public void onClick(ClickEvent event) {
    Window.alert("Hello, AJAX");
    }
    });
     
    RootPanel.get().add(b);
    }
    }
  • 86. Code Splitting
    public class Hello implements EntryPoint {
    public void onModuleLoad() {
    Button b = new Button("Click me", new ClickHandler() {
    public void onClick(ClickEvent event) {
    Window.alert("Hello, AJAX");
    }
    });
     
    RootPanel.get().add(b);
    }
    }
  • 87. Code Splitting
    public class Hello implements EntryPoint {
    public void onModuleLoad() {
    Button b = new Button("Click me", new ClickHandler() {
    public void onClick(ClickEvent event) {
    GWT.runAsync(new RunAsyncCallback() {
    public void onFailure(Throwable caught) {
    Window.alert("Code download failed");
    }
    public void onSuccess() {
    Window.alert("Hello, AJAX");
    }
    });
    }
    });
    RootPanel.get().add(b);
    }
    }
  • 88. HTML5 Features Support
  • 89. HTML5 Features Support
    • Client-side Storage – Use LocalStorage, SessionStorage, and monitor StorageEvents
  • HTML5 Features Support
    • Client-side Storage – Use LocalStorage, SessionStorage, and monitor StorageEvents
    • 90. Canvas – Add visualizations using Canvas
    • 91. Audio – Use Audio widgets
    • 92. Video – Use Video widgets
  • HTML5 Features support
  • 93. To be continued…
    • Client-server communication (RPC, JSON/XML)
    • 94. MVP framework (Activities and Places)
    • 95. DevMode (code-test-debug cycle)
    • 96. Modules (properties, rules)
    • 97. Generators (meta-programming)
    • 98. UiBinder
    • 99. Cell Widgets (CellTable, CellTree, CellBrowser)
    • 100.
    http://www.exigenservices.by/webinars