1 / 32

Google Web Toolkit (GWT) Steve Wargolet

Google Web Toolkit (GWT) Steve Wargolet. Introduction. Desktop client-server applications and their drawbacks. Static-only Web pages Introduction of Web applications. What is GWT?. Powerful web application development toolkit Write -> Debug/Test -> Optimize -> Run

ksena
Download Presentation

Google Web Toolkit (GWT) Steve Wargolet

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 (GWT) Steve Wargolet

  2. Introduction • Desktop client-server applications and their drawbacks. • Static-only Web pages • Introduction of Web applications

  3. What is GWT? • Powerful web application development toolkit • Write -> Debug/Test -> Optimize -> Run • Primarily Java -> JavaScript, HTML, AJAX • Cross-Browser support.

  4. The ‘Right’ Design Pattern • What’s the right design pattern for a GWT app? • MVC vs. MVP

  5. Client/Server Communication • Remote Procedure Calls (RPC) • Asynchronous • Different mindset • 3 Components needed in GWT for RPC • Interface for the service (header) • Implementation of interface • Asynchronous interface for Client

  6. Serialization • Needed for RPC • Serialization is the process of packaging the contents of an object so that it can (be) moved from one application to another application or stored for later used.

  7. Serialization • Must satisfy at least one of the following requirements. • It is a primitive type (int, char, boolean, etc.) • It is an array of serializable types • A class is serializable if it meets these three requirements: • It implements either Java Serializable or GWT’s ‘IsSerializable’ interface, either directly, or because it derives from a superclass that does. • Its non-final, non-transient instance fields are themselves serializable, and • It has a default constructor

  8. The ‘Back’ Button Problem • GWT vs. the ‘Back’ button. • URL doesn’t change • Handling the problem • The History Class • Tokens • www.mywebapp.com/myapp • www.mywebapp.com/myapp#registration

  9. 1 2 3

  10. Compilation • One of the most advanced features • Optimizations • Three output styles • Obfuscated • Pretty • Detailed

  11. Obfuscated

  12. Pretty

  13. Detailed

  14. Optimizations • Major selling point of GWT • Dead Code Elimination • Constant Folding • Window.alert(“Hello ” + “World”) -> $wnd.alert(“Hello World”) • Copy Propagation • String Interning • Code In-Lining

  15. Optimizations • Code splitting

  16. Permutations 24 Total Permutations 6 Browser types and 4 locales

  17. GWT Designer • Easily build the GUI • Very little CSS experience needed • Drag and Drop • Design Preview • Many included Widgets and Panels

  18. GWT Designer

  19. Panels • Panels contain widgets and other panels. • Define layout • >15 Panels availableeach with own pros and cons.

  20. Basic Panels • Root Panel • Top-Most Panel • Automatically created • HTML <body> element

  21. Basic Panels • Absolute Panel

  22. Basic Panels • Vertical/Horizontal Panel – Uses HTML table

  23. Basic Panels Grid Flex Table

  24. Basic Panels • Flow Panel - Div

  25. Basic Panels • Dock (Layout) Panel – North/South/East/West/Center

  26. Widgets • Many useful widgets • Button, textbox, ListBox, … • Easily create events

  27. Composite Class • Wrap a widget(s) in order to hide their methods • Custom Widgets • Create your own methods • Make existing methods visible • Can’t modify composite outside of itself • Can be reused

  28. Examples • http://code.google.com/webtoolkit/examples/

  29. DEMO

  30. Questions

  31. References • Remick, J. (2011, January 30). What is a web app? here’s our definition. Retrieved from http://web.appstorm.net/general/opinion/what-is-a-web-app-heres-our-definition/ • Google. (2011). Google web toolkit . Retrieved from http://code.google.com/webtoolkit/ • Kereki, K. F. (2011). Essential gwt building for the web with google web toolkit 2. Boston, MA: Pearson Education, Inc. • Gupta, I. (2009). Accelerated gwt, building enterprise google web toolkit applications. Berkeley, CA: Apress. • Chaganti, R. (2007). Google web toolkit: Gwt java ajax programming. Birmingham, UK: Packt Pub Ltd.

  32. Title • Body

More Related