contents
preface
acknowledgments
about this book
about the cover illustration
- Part 1 Getting Started
- 1 Introducing GWT
- 1.1 Why GWT
- History
- Why Ajax matters
- Leveraging the web
- Tooling and testing
- A single code base
- Limitations
- 1.2 What GWT includes
- GWT compiler
- User Interface layer
- Remote Procedure Calls
- Additional utilities
- GWT shell
- 1.3 GWT basics
- Modules and inheritance
- Host pages
- Entry point classes
- 1.4 Working with the GWT shell
- The logging console
- The hosted mode browser
- 1.5 Understanding the GWT compiler
- JavaScript output style
- Additional compiler nuances
- The compiler lifecycle
- 1.6 Summary
- 2 A New Kind of Client
- 2.1 Basic project structure and components
- Generating a project
- The standard directory structure
- GWT starting point files
- Host pages
- Modules
- Entry points
- 2.2 Design patterns and GWT
- MVC and GWT
- Creating a widget
- Communicating by observing events
- Operator strategy
- Controlling the action
- 2.3 Styling a GWT component
- Providing a CSS file
- Connecting style names with Java
- 2.4 Running a completed project
- Hosted mode and the GWT shell
- Web mode and the GWT compiler
- 2.5 Summary
- 3 Communicating with the Server
- 3.1 Making GWT Remote Procedure Calls
- Starting the HelloServer project
- Defining GWT serializable data
- Creating RPC services
- Expanding on RemoteServiceServlet
- Calling the server from the client
- Troubleshooting server communication
- 3.2 The development serverTomcat Lite
- The web.xml file
- The context.xml file
- 3.3 Using an external development server
- 3.4 Summary
- Part 2 Task-specific Issues
- 4 Core Application Structure
- 4.1 Building a model
- 4.2 Building view components
- Extending widgets
- Extending composite
- Binding to the model with events
- 4.3 The controller and service
- Creating a simple controller
- JPA-enabling the model
- Creating a JPA-enabled service
- 4.4 Summary
- 5 Other Techniques for Talking to Servers
- 5.1 Web development methods and security
- Dealing with browser security
- Understanding XMLHttpRequest
- Coding asynchronously
- Developing GWT applications in NetBeans
- 5.2 Enabling REST and POX communications
- Making basic HTTP requests with GWT
- Making advanced HTTP requests with GWT
- Working with XML
- 5.3 Understanding Java-to-JavaScript interaction
- Using GWT JavaDoc annotations to serialize collections
- Using JSON
- 5.4 Creating a cross-domain SOAP client with Flash
- Using Flash as a SOAP client
- Setting a Flash security context
- Drawbacks and caveats
- 5.5 Incorporating applets with GWT
- Using Java as a SOAP client
- Signing JARs for security bypass
- 5.6 Streaming to the browser with Comet
- 5.7 Summary
- 6 Integrating Legacy and Third-Party Ajax Libraries
- 6.1 A closer look at JSNI
- JSNI basics revisited
- Potential JSNI pitfalls
- Configuring IntelliJ IDEA
- 6.2 Wrapping JavaScript libraries
- Creating a JavaScript module
- Creating wrapper classes
- Using the wrapped packages
- 6.3 Managing GWT-JavaScript interaction
- Maintaining lookups
- Daisy-chaining Java listeners into JavaScript closures
- Maintaining listeners in Java
- Conversion between Java and JavaScript
- 6.4 Wrapping JavaScript with GWT-API-Interop
- 6.5 Summary
- 7 Building, Packaging, and Deploying
- 7.1 Packaging GWT modules
- Building and packaging modules
- Sharing modules
- 7.2 Building and deploying applications
- The client side
- The server side
- Manually building a WAR file
- 7.3 Automating the build
- Extending the Ant build
- Using Maven
- 7.4 Managing Tomcat Lite from the build
- 7.5 Summary
- 8 Testing and Continuous Integration
- 8.1 GWT testing
- Knowing what to test
- How GWT testing works
- Testing gotchas
- Basic GWT tests
- Testing outside of GWT
- 8.2 Advanced testing concepts
- Benchmarking
- Remote testing
- Code coverage
- Coverage in an automated build
- 8.3 Continuous integration
- Adding a GWT project to Hudson
- 8.4 Summary
- Part 3 Fully Formed Applications
- 9 Java Enterprise Reinvented
- 9.1 Constructing two models
- 9.2 Mapping to DTOs
- 9.3 Wiring applications with Spring
- 9.4 Constructing the client application
- The controller and global model
- The basic CRUD wrapper
- The BookEdit widget
- 9.5 Summary
- 10 Building the Storefront
- 10.1 Securing GWT applications
- 10.2 Building a drag-and-drop system
- Enabling dragging
- Handling drops
- 10.3 JSNI special effects
- 10.4 Summary
- 11 Managing Application State
- 11.1 Overview of the sample application
- 11.2 Creating a basic messaging service
- 11.3 Handling messages on the client and server
- Messages and CometEvents
- Streaming messages to the client
- Receiving images
- 11.4 Recording and playing back conversations
- Capturing changes to the model layer
- Handling deep links
- When to use hyperlinks rather than history
- 11.5 Dealing with state on the server side
- 11.6 Adding a UI and cleaning up
- Displaying events
- Sending events
- Cleaning up
- 11.7 Summary
-
- appendix A Notable GWT Projects
- appendix B Quick Reference
-
index