Advanced GWT
Private Training

Course Summary

Google Web Toolkit (GWT) allows Java developers to create Web 2.0-ready Ajax front ends. GWT compiles these Java artifacts into optimized JavaScript for all major browsers. This intensive, hands-on course explores advanced GWT features from user interface widgets to client-server integration. First, students will learn how to create and use GWT modules. From there, they will explore many advanced user interface widgets and panels. Then they will learn how to apply styles to GWT widgets with CSS. Next, students will learn to create their own composite widgets. JUnit testing is the focus of the next chapter, followed by a chapter on the GWT Java Emulator. Students will then learn about various connectivity and integration features of GWT as well as how to invoke native JSNI methods. Finally, the course ends with a chapter on GWT best practices.

Audience
Java developers who wish to quickly create Ajax application with the Google Web Toolkit.
Course Length
2 Days
Prerequisites
GWT and Java programming experience is required. Basic knowledge of HTML, CSS, and JavaScript is recommended. Previous experience doing widget-based Form development using events as well as HTTP exposure is beneficial.

Objectives

Create and use modules in GWT.

Design user interfaces with more advanced GWT widgets including the ToggleButton, Tree, SuggestBox, and RichTextArea.

Style GWT widgets with CSS.

Create your own composite widgets.

Develop and execute GWT unit tests with JUnit

Discover the GWT’s Java Emulator, its capabilities and limitations.

Learn to use GWT’s DOM management.

Describe advanced connectivity mechanisms, polling and related concepts.

Use the various integration options to work with servers, including XML, JSON and GWT-RPC.

Declare and invoke native JSNI methods.

Describe some best practices on performance and avoiding pit falls.

Detailed Outline

  1. Using Modules in GWT
    • GWT Modules
    • Using External Modules
    • Modularizing an Application
    • Deferred Binding
    • Multiple-Module Applications
    • Code Splitting
  2. More on GWT User Interfaces
    • ToggleButton and PushButton
    • DecoratorPanel
    • AbsolutePanel
    • HTMLPanel
    • FocusPanel
    • StackPanel
    • TabPanel
    • The DeckPanel
    • The DisclosurePanel
    • Using Menus via a MenuBar
    • Using a Tree Widget
    • Using SuggestBox
    • GWT RichTextArea Editing
    • FormPanel
  3. GWT UiBinder and SafeHtml
    • UiBinder Types
    • UiBinder Benefits
    • Binder XML Files and Java Files
    • Creating Widget-Based UiBinder Templates
    • Creating a UiBinder in Eclipse
    • Passing Values to Binders via Tag Attributes
    • Handling Events in HTML-Based UiBinder Templates
    • Providing Instances for UiFields
    • Using SafeHtml
  4. Styling with CSS in GWT
    • Styling with CSS
    • GWT Visual Themes
    • Associating CSS Files with a Module
    • Styling Widgets in GWT
    • Complex GWT Styles
    • Dependent Styles in Widgets
    • More ClientBundle Elements: CSS Resources, Data Resources, and External Resources
  5. Creating Composite GWT Widgets
    • Custom GWT Widgets
    • Composite GWT Widgets
    • Developing Composite Widgets
    • Manipulating Contained Widgets
    • The initWidget() Method
    • Event Handlers
    • Styling Composites
  6. Testing and Debugging GWT Modules
    • Unit Testing Concepts
    • The JUnit Test Framework
    • Writing a JUnit Test Case
    • GWT Unit Testing with GWTTestCase
    • Creating and Running Tests
    • Testing Asynchronous Code
    • GWT System Testing
    • GWT User Interface Testing
  7. Model-View-Presenter and Dependency Injection
    • Introduction to Model-View-Presenter
    • The Event Bus
    • Managing Asynchronous Data in MVP Applications
    • Unit Testing MVP with Mock UI Elements
    • Dependency Injection
    • Unit Testing with Dependency Injection
  8. More Server Integration Options in GWT
    • Using HTTP Requests
    • Posting Data Parameters
    • Manipulating in XML DOM
    • XML Support in GWT
    • Generating XML Documents in GWT
    • Integrating Using JSON
    • GWT Support for JSON
    • Generating JSON on the Server
  9. GWT JavaScript Native Interface
    • Defining JSNI Methods
    • Sharing Data Between JavaScript and Java
    • Talking to the Browser via JSNI
    • Using External JavaScript
    • Using a JavaScriptObject in GWT
    • Using JSNI with JSON
    • Java Callbacks from External JavaScript
    • Using External Libraries
  10. Advanced GWT Connectivity
    • Stateful and Stateless Servers
    • The Model-View Presenter Approach
    • Using Stateful Servers
    • The Request Factory
    • Using Editors
  11. Client-Side RPC Architecture in GWT
    • Client-Side Polling
    • Server Push
    • Implementing Server Push
    • Server Push
    • Polling Protocols
  12. GWT Best Practices
    • General Coding Practices
    • Avoid Native JavaScript Code
    • Security Issues
    • Handling Long Processing
    • The GWT IncrementalCommand Class
    • Internationalization in GWT
    • GWT Pitfalls and Issues
    • Large Projects
    • Merging with HTML
    • GWT Styling
    • Testing Practices for GWT
    • Unit Testing Principles
    • Bandwidth-Sensitive Applications
    • Reduced Theme Downloads
    • Minimize Server State Requirements
    • Dependency Injection