GWT: Our Experiences

4,719 views

Published on

Introduction and our experience on using GWT

Published in: Business
1 Comment
4 Likes
Statistics
Notes
No Downloads
Views
Total views
4,719
On SlideShare
0
From Embeds
0
Number of Embeds
209
Actions
Shares
0
Downloads
55
Comments
1
Likes
4
Embeds 0
No embeds

No notes for slide

GWT: Our Experiences

  1. 1. 2008.5.17 馮彥文
  2. 2. About Me <ul><li>馮彥文 a.k.a Tempo </li></ul><ul><ul><li>Twitter: tempofeng </li></ul></ul><ul><ul><li>Blog: run, tempo, run (google: tempo) </li></ul></ul><ul><ul><li>Liquable Inc: [email_address] </li></ul></ul><ul><li>活動 </li></ul><ul><ul><li>Happyweb: http://happyweb.tw </li></ul></ul><ul><ul><li>Java User Group: http://www.javaworld.com.tw </li></ul></ul>
  3. 3. Agenda <ul><li>GWT & Features </li></ul><ul><li>Communicate With Others Systems, Frameworks </li></ul><ul><li>Pitfalls </li></ul>
  4. 4. Google Web Toolkit
  5. 5. Writing AJAX Applications in Java
  6. 6. CSS GWT Class Library JavaScript GWT Compiler Java Source Code
  7. 7. Module.xml
  8. 8. EntryPoint
  9. 9. HTML
  10. 10. Hello World Demo
  11. 11. Swing, SWT Like Programming Model
  12. 12. Components, Containers, Events, …
  13. 13. Composite Widget
  14. 15. Widget Demo
  15. 16. Hosted Mode / No-Server Mode
  16. 17. No-Server Mode Demo
  17. 18. Scalability
  18. 19. Stateless Servers, Stateful Clients
  19. 20. Business Logic as Well
  20. 21. History Management
  21. 22. History Demo
  22. 23. JUnit Integration
  23. 24. Open Source (Apache 2.0 License)
  24. 25. Comparison <ul><li>DWR </li></ul><ul><ul><li>Best for communicating with Java server, No UI components </li></ul></ul><ul><li>Dojo </li></ul><ul><ul><li>Hard, less document but powerful </li></ul></ul><ul><li>Ext-js </li></ul><ul><ul><li>Nice UI, less document, license issue </li></ul></ul><ul><li>Jquery </li></ul><ul><ul><li>No UI components </li></ul></ul>
  25. 26. Communication With Others Systems, Frameworks
  26. 27. GWT Scripts Can Be Used as XSS
  27. 28. Client GWT-RPC Server 2 WEB Server GWT-RPC Server 1
  28. 29. RPC <ul><li>HTTP </li></ul><ul><ul><li>RequestBuilder </li></ul></ul><ul><li>GWT-RPC </li></ul><ul><ul><li>Easy for Java servers </li></ul></ul><ul><li>JSON </li></ul><ul><li>Rest (XML) </li></ul>
  29. 30. JavaScripts <ul><li>JavaScript Native Interface (JSNI) </li></ul><ul><li>GWT-API-Interop </li></ul><ul><ul><li>http://code.google.com/p/gwt-api-interop/ </li></ul></ul>
  30. 31. Web Pages <ul><li>gwt-params </li></ul>
  31. 32. Pitfalls
  32. 33. Value Objects
  33. 34. Tranform GWT-RPC Use Java JavaScript Hibernate Obj (PersistList, …) Value Obj Value Obj (JavaScript) GWT JavaScript
  34. 35. Value Objects <ul><li>Same as other serialization framework </li></ul><ul><li>Data-binding </li></ul><ul><ul><li>Hibernate4get </li></ul></ul><ul><ul><ul><li>http://hibernate4gwt.sourceforge.net/ </li></ul></ul></ul><ul><ul><li>XSTM </li></ul></ul><ul><ul><ul><li>http://www.xstm.net/ </li></ul></ul></ul>
  35. 36. SEO? <ul><li>Decorate output page, don’t cloak </li></ul>
  36. 38. SEO? <ul><li>Based on GWT Output </li></ul>
  37. 39. Project Structure <ul><li>Gwt-maven </li></ul><ul><ul><li>http://code.google.com/p/gwt-maven/ </li></ul></ul><ul><li>Copy generated JavaScript to src in webapp </li></ul>
  38. 40. Page Layout
  39. 41. VerticalContainer, HorizontalContainer Are Using Tables
  40. 42. JDK 1.4 Only <ul><li>For client codes only </li></ul><ul><li>Wait for GWT 1.5 </li></ul>
  41. 43. Missing Classes <ul><li>Reflection </li></ul><ul><li>GWTx </li></ul><ul><ul><li>http://code.google.com/p/gwtx/ </li></ul></ul><ul><li>Gwittir </li></ul><ul><ul><li>http://code.google.com/p/gwittir/ </li></ul></ul>
  42. 44. Thank You!

×