Book description
NEWER EDITION AVAILABLE
GWT in Action, Second Edition is now available. An eBook of this older edition is included at no additional cost when you buy the revised edition!
The Web is experiencing a new growth with an emphasis on rich, web-based applications. These applications can be difficult to build because they rely on JavaScript, which lacks the sophisticated object-oriented structures and static typing of Java, they are tricky to debug, and they require you to manage numerous browser inconsistencies.
The Google Web Toolkit (GWT) is a new technology from Google that automatically translates Java into JavaScript, making Ajax applications easier to code and deploy. GWT in Action is a comprehensive tutorial for Java developers interested in building the next generation of rich, web-based applications. This book was written by Robert Hanson, creator of the popular GWT Widget Library, and Adam Tacy, a major contributor to the GWT Widget Library.
About the Technology
In May of 2006 Google released the Google Web Toolkit. GWT enables developers to create Ajax applications in Java. With GWT, you can build your applications using a real object-oriented language and take advantage of Java tools like Eclipse that are already available. Instead of trying to bring tool support to Ajax, Google brought Ajax to a place where the tools already existed.
About the Book
GWT in Action shows you how to take advantage of these exciting new tools. This clearly-written book is packed with hands-on GWT examples. You'll absorb the GWT philosophy as you build your first working GWT application.
The book begins by exploring the main features of GWT, including
- Compiling Java to JavaScript, the magic that really defines GWT
- Building client-side components
- Convenient JUnit integration and testing
- Interacting with JavaScript and existing JavaScript libraries
- Internationalization
You'll also see how GWT compares to other toolkits.
GWT in Action shows you how to set up your development environment, use and create widgets, communicate with the server, and much more. Readers will follow an example running throughout the book and quickly master the basics of GWT: widgets, panels, and event handling. The book covers the full development cycle, from setting up your development environment, to building the application, then deploying it to the web server. The entire core GWT library is discussed, with details and examples on how it can be extended.
You'll cover:
- Testing, debugging, and deploying GWT Applications
- Communicating with GWT-RPC
- Examining client-side RPC architecture
- Alternative RPC tools: HTTPRequest, RequestBuilder, and FormPanel
- Achieving interoperability in GWT with JavaScript Object Notation (JSON)
- Making your GWT application flexible and supportable
GWT helps you make the most of Ajax in your web applications and GWT in Action helps you get more out of GWT.
What's Inside
- Comprehensive GWT tutorial
- Build a full-scale GWT application
- Interacting with the server using GWT-RPC, JSON, and other tools
- Building, testing, and deploying GWT applications
About the Reader
About the Authors
Robert Hanson is a US-based senior Internet engineer and creator of the popular open source GWT Widget Library. Robert also maintains a blog at http://roberthanson.blogspot.com where he talks about GWT and other topics relating to the industry.
Adam Tacy is a consultant working for WM- Data in the Nordics and a contributor to the GWT Widget Library project.
Quotes
... impressive quality and thoroughness. Wonderful!
- Bernard Farrell, Software Architect, Kronos Inc.
How to 'think in GWT'. The code: concise, efficient, thorough, and plentiful.
- Scott Stirling, Senior Consultant at USi and AT&T Company
Perfect for Java developers struggling with JavaScript.
- Carlo Gottiglieri, Java Developer, Sytel-Reply
A real nitty-gritty tutorial on the rich features of GWT.
- Andrew Grothe, COO Eliptic Webwise, Inc.
Table of contents
- Copyright
- Preface
- Acknowledgments
- About this Book
- About the Title
- About the Cover Illustration
-
1. Getting started
-
1. Introducing GWT
-
1.1. A walk through GWT
- 1.1.1. Explaining GWT’s Java-to-JavaScript compiler
- 1.1.2. Using JSNI to execute JavaScript from Java
- 1.1.3. Accessing the JRE emulation library
- 1.1.4. Understanding GWT’s widget and panel library
- 1.1.5. Examining GWT’s internationalization and configuration tools
- 1.1.6. Calling remote procedures with GWT
- 1.1.7. Investigating GWT’s XML parser
- 1.1.8. Managing the browser history
- 1.1.9. Introducing GWT’s JUnit integration
- 1.2. GWT vs. other solutions
- 1.3. Building your first GWT application
- 1.4. Summary
-
1.1. A walk through GWT
- 2. Creating the default application
- 3. Advancing to your own application
-
1. Introducing GWT
-
2. Building user interfaces
-
4. Working with widgets
- 4.1. What is a widget?
- 4.2. The standard GWT widgets
- 4.3. Creating new widgets
- 4.4. Developing the Dashboard’s ToggleMenuItem widget
- 4.5. Summary
-
5. Working with panels
- 5.1. What is a panel?
- 5.2. The standard GWT panels
- 5.3. Creating new panels
- 5.4. Creating the Dashboard panel
- 5.5. Summary
-
6. Handling events
- 6.1. Exploring events
-
6.2. Listening to events
- 6.2.1. Sinking events
- 6.2.2. Managing sunk events with the onBrowserEvent() method
- 6.2.3. Linking sunk events to the onBrowserEvent() method
- 6.2.4. Previewing events
- 6.2.5. Handling events by extending the listener classes
- 6.2.6. Moving events further into your GWT code
- 6.2.7. Preventing default browser event handling
- 6.3. Handling standard browser events
- 6.4. Handling other event types
- 6.5. Implementing drag-and-drop
- 6.6. Summary
- 7. Creating composite widgets
- 8. Building JSNI components
-
9. Modularizing an application
-
9.1. Creating a modularization structure
- 9.1.1. Modularization in GWT
- 9.1.2. Including other modules in an application
- 9.1.3. Setting source and other resource paths
- 9.1.4. Defining an application’s server resources
- 9.1.5. Managing an application’s GWT properties
- 9.1.6. Replacing classes based on property values
- 9.1.7. Registering generators in the XML module file
- 9.1.8. Injecting resources into an application at runtime
- 9.1.9. Setting an application’s entry point
- 9.1.10. The Dashboard’s module XML file
- 9.2. Including third-party modules
- 9.3. Packaging your own modules
- 9.4. Creating the Java package structure
- 9.5. Summary
-
9.1. Creating a modularization structure
-
4. Working with widgets
-
3. Advanced techniques
- 10. Communicating with GWT-RPC
- 11. Examining client-side RPC architecture
-
12. Classic Ajax and HTML forms
- 12.1. Classic Ajax with RequestBuilder
- 12.2. Examining FormPanel basics
- 12.3. Summary
- 13. Achieving interoperability with JSON
-
14. Automatically generating new code
- 14.1. Generating new types
- 14.2. Investigating GWT generators
- 14.3. Creating a generator for the Dashboard
- 14.4. Summary
-
15. Changing applications based on GWT properties
- 15.1. Quick summary of properties
- 15.2. Managing browser differences
-
15.3. Supporting internationalization in full
-
15.3.1. Using static-string internationalization
- Defining static string internationalization constants
- Defining static string internationlization constants with lookup
- Defining static-string internationalization messages
- Establishing the messages file and directory structure
- Creating messages for the default locale
- Adding messages for other locales
- Localization of dates, times, and currencies
- 15.3.2. Using dynamic string internationalization
-
15.3.1. Using static-string internationalization
- 15.4. Altering the application for the locale
- 15.5. Implementing user-defined properties
- 15.6. Summary
-
4. Completing the understanding
- 16. Testing and deploying GWT applications
- 17. Peeking into how GWT works
Product information
- Title: GWT in Action
- Author(s):
- Release date: May 2007
- Publisher(s): Manning Publications
- ISBN: 9781933988238
You might also like
book
GWT in Practice
GWT in Practice is an example-driven, code-rich book designed for web developers who have already learned …
book
GWT in Action, Second Edition
GET MORE WITH MANNING An eBook copy of the previous edition, GWT in Action (First Edition), …
book
Essential GWT: Building for the Web with Google Web Toolkit 2
With Google Web Toolkit, Java developers can build sophisticated Rich Internet Applications (RIAs) and complete Web …
book
Extending jQuery
Extending jQuery teaches you to build custom extensions to the jQuery library. It covers all the …