Pearson Education Home Higher Education HomeInstructor SupportStudent SupportAbout UsCareers
Bookshop
Texts & Technology
ABOUT THIS PRODUCT
Table of Contents
Features
Preface
Sample Chapter
About the Author(s)
 
RESOURCES
First Day of Class
 
RELATED TITLES
Java--Intermediate Programming (Computer Science)
Google Web Toolkit Solutions: More Cool & Useful Stuff
View Larger Cover Image
View Larger Image

David Geary
Rob Gordon, Colorado Springs, Colorado

Publisher: Prentice Hall
Copyright: 2008
Format: Paper; 408 pp

ISBN-10: 0132344815
ISBN-13:9780132344814Help icon

Our Price: £28.99
Instock
Published: 15 Nov 2007
This title is not for sale to the US or Canada.
Add this item to my shopping basket


Add to Exam Copy BookbagAdd to Exam Copy Bookbag PrintPrint Product Information

Preface
00_0132344815_FM.qxd

Preface

There are what, six million Java developers? And the majority of those have used a desktop application framework such as Swing. I speak about Google Web Toolkit (GWT) regularly on the No Fluff Just Stuff (nofluffjuststuff.com) tour, at Java Users Groups, and at other conferences, and one of the first things I do is ask how many of the attendees have used either the Abstract Window Toolkit (AWT), Swing, or SWT. The response is always about 95 percent.

What do AWT, Swing, and SWT have to do with Google Web Toolkit? In many respects, GWT is Swing for web applications that do not require an enabling technology like Web Start. GWT lets you develop applications that run in a browser using familiar idioms from AWT, Swing, and SWT. After asking attendees if they've used Swing, AWT, or SWT, the next thing I tell them is, "For those of you who raised your hands, intuitively you already know how to use GWT." Of course, they must learn a new framework and API (and for that, they undoubtedly will need a good book), but the point is that instinctively, they already know how to implement Ajax-enabled applications that run in a browser. If you've used AWT, Swing, or SWT, and I tell you that you typically write event handlers by implementing event handler interfaces in anonymous inner classes with GWT, you know exactly what I mean. And if I tell you that GWT provides adapter classes with no-op implementations of those interfaces so you can selectively override only the methods that you are interested in, you should feel like you've finally arrived home after a long and arduous journey coaxing simple Ajax functionality out of JavaScript, HTML, CSS, and XMLHttpRequest objects. The fact that GWT is so immediately accessible to so many developers is one of its greatest selling points.

When Rob and I realized what GWT was and what it could do, we were very excited about its potential. In fact, we were so excited that we decided to write this book. I've written seven Java books over the past ten years, and it seems that no matter how many books I write, it's still a great deal of work to write another one, so I don't commit to a book unless I believe the topic has the potential to be the "next big thing." GWT was compelling enough for me to put my money on, and to spend six months of my life to get this book in your hands.

But GWT is not just about building Ajax-enabled web applications. It's about building desktop-like applications that run in a browser. In this book, Rob and I show you how to implement an application that lets you open multiple windows inside your browser, where each window contains a map of an address you supply to the Yahoo! Maps web service. You can drag the windows around inside the browser, resize the windows, and drag the maps around inside their windows. Not only that, but you can zoom in and out of the maps by manipulating a GWT widget that floats above the map inside the window. You can also initiate animated scrolling, very similar to Apple's animated scrolling of contact lists on the iPhone, by quickly dragging a map. When you drag the map for less than half a second, the application initiates animated scrolling of the map in the direction of the drag and at a speed relative to the amount of pixels the drag covered. That sort of functionality is simply not possible in other web application frameworks such as Struts—and yes, even Ruby on Rails—without writing a good deal of JavaScript code and integrating it into the framework.

So, GWT differentiates itself from other web application frameworks by providing support for desktop-like applications that run in a browser. It's a mistake to think of GWT as simply a web application framework with Ajax baked in. GWT, like Flash or Flex, empowers developers to implement all of the rich features you would find in a desktop application.

This book is not an introduction to GWT. If you are not familiar with GWT, we cover some basics in the first solution, but from then on out, we leave the basics behind and dive into the good stuff. We assume that you can get the basics from the web, or from other books that cover such banal ground. We want to show you the cool stuff and teach you how to kick ass with GWT. So turn that page, and let's commence with the asskicking!


 
Pearson Education Home