1 / 20

Google Web Toolkit

Google Web Toolkit. Paul Heiniz , Wolfgang Kluth , Jan Marten, Malte Behrendt. The slides are licensed under a Creative Commons Attribution 3.0 License. Outline. Introduction Features of GWT In Browser Development Mode Java- to -JavaScript Compiler Server Communication

kasi
Download Presentation

Google Web Toolkit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Google Web Toolkit Paul Heiniz, Wolfgang Kluth, Jan Marten, MalteBehrendt The slides are licensed under aCreative Commons Attribution 3.0 License Web Technologies – Prof. Dr. Ulrik Schroeder – WS 2010/11

  2. Outline • Introduction • Features of GWT • In Browser Development Mode • Java-to-JavaScript Compiler • Server Communication • Model-View-Presenter Design Pattern • Hands-on • Hello World (GWT 1.x) • Hello World (GWT 2.1) • Hello World (GWT 2.1 RPC) • Summary Web Technologies

  3. Introduction • Whatis GWT? • Development Toolkit for Browser-basedApplications • Application Development in Java • Type-Safe Language • Nomemory-leaks • TestingwithJunit • Java-IDEs (Eclipse-Plugin) • ApplicationDeployment in HTML/AJAX • Java-to-JavaScript/HTML (AJAX) Compiler Web Technologies

  4. Features • Core featuresof GWT • Java-to-JavaScript/HTML Compiler • HighlyoptimizedJavaScript • Browser independence/Deferred Binding • Easy Internationalization • History Support • Safe HTML • JavaScript Native Interface • UI-Binder • Code in Java, Layout in CSS • Developer Mode • LocalTestingand Debugging • Speed Tracer Web Technologies

  5. Features • Features of GWT • Manyready-to-useWidgets • Composites Web Technologies

  6. Features • Disadvantagesof GWT • Dependence on Google • Learning curve • Exampleapplications • Orkut • Google Wave • Google Adwords Web Technologies

  7. Outline • Introduction • Features of GWT • In Browser Development Mode • Java-to-JavaScript Compiler • Server Communication • Model-View-PresenterDesign Pattern • Hands-on • Hello World (GWT 1.x) • Hello World (GWT 2.1) • Hello World (GWT 2.1 RPC) • Summary Web Technologies

  8. In-Browser Development Mode • Actual rendering is done in browser • Code runs as Java Bytecode → Debugging! Web Technologies

  9. Java-to-JavaScript Compiler • JRE Emulation Library → used for developer mode • Most ofjava.lang • Most ofjava.util • Some java.io, java.sql • Compiler → Generates JavaScript from the Java source code • JavaScript in GWT is like bytecode for Java Applications • Optimization → often better than hand coding • Dead Code Elimination • Constant Folding • Copy Propagation • String Interning • … Web Technologies

  10. Server Communication • GWT RPC • Based on/are Java Servlets • Other • (HTTP-) RequestBuilder + JSON or XML • JSNI Methods • Third-Party libraries (e.g. for PHP) Web Technologies

  11. Design Patterns Challenges when building large scale applications Multiple developers working simultaneously Maintaining legacy functionality Messy code... Solution: separation of concerns (by Design Patterns) For example: Model-View-Controller Web Technologies

  12. Design Pattern: MVP MVP: Structure application into Model: Encompass objects View: UI Components/Layout + UI Event Handling Presenter: Application Logic (AppController: Application Layer Logic) GWT 2.1 offers a MVP Framework Activities (Presenter) Places (UI State) Web Technologies

  13. Outline • Introduction • Features of GWT • In Browser Development Mode • Java-to-JavaScript Compiler • Server Communication • Model-View-PresenterDesign Pattern • Hands-on • Hello World (GWT 1.x) • Hello World (GWT 2.1) • Hello World (GWT 2.1 RPC) • Summary Web Technologies

  14. Summary Web Technologies

  15. Hands – On - HelloWorld (GWT 1.x) Web Technologies

  16. Hands – On - HelloWorld (GWT 1.x) • Hello World (GWT 1.x) • Live Demonstration • Show Developer Mode • Show result/Hello World Web Technologies

  17. Hands – On - Hello World (GWT 2.1) UI XML-File: Web Technologies

  18. Hands – On - Hello World (GWT 2.1) Java-Code: Web Technologies

  19. Hands – On - Hello World (GWT 2.1) • Hello World (GWT 2.1) • Live Demonstration • Result/Hello World Web Technologies

  20. Hands – On - HelloWorld (GWT 2.1) • Live Demonstration • Result/Hello World • FieldVerifier Web Technologies

More Related