Google Web Toolkit Solutions: More Cool and Useful Stuff / Edition 1

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 95%)
Other sellers (Paperback)
  • All (14) from $1.99   
  • New (5) from $1.99   
  • Used (9) from $1.99   

Overview

Cu>

Google Web Toolkit (GWT) is an open source Java development framework for building Ajax-enabled web applications. Instead of the hodgepodge of technologies that developers typically use for Ajax–JavaScript, HTML, CSS, and

This book focuses on the more advanced aspects of GWT that you need to implement real-world applications with rich user interfaces but without the heavy lifting of JavaScript and other Ajax-related technologies. Each solution in this practical, hands-on book is more than a recipe. The sample programs are carefully explained in detail to help you quickly master advanced GWT techniques, such as implementing drag-and-drop, integrating JavaScript libraries, and using advanced event handling methodologies.

Solutions covered include

•   Building custom GWT widgets, including both high-level composites and low-level components

•   Implementing a viewport class that includes iPhone-style automated scrolling

•   Integrating web services with GWT applications

•   Incorporating the Script.aculo.us JavaScript framework into GWT applications

•   Combining Hibernate and GWT to implement database-backed web applications

•   Extending the GWT PopupPanel class to implement a draggable and resizable window

•   Creating a drag-and-drop module, complete with drag sources and drop targets

•   Deploying GWT applications to an external server

•   Dynamically resizing flex tables

•   Using GWT widgets in legacy applications developed with other frameworks, such as Struts and JavaServer Faces

Complete Sample Code Available at www.coolandusefulgwt.com

All of the code used in this book has been tested, both in hosted and web modes, and in an external version of Tomcat (version 5.5.17), under Windows, Linux, and Mac OS X. For Windows and Linux, we used 1.4.60, and for the Mac we used 1.4.61.  NOTE: There are three separate versions of the code. Please download the correct JAR file for the operating system you are using.

Foreword xiii

Preface xvi

Acknowledgments xviii

About the Authors xix

Solution 1: GWT Fundamentals and Beyond 1

Solution 2: JavaScript Integration 53

Solution 3: Custom Widget Implementation 71

Solution 4: Viewports and Maps 103

Solution 5: Access to Online Web Services 133

Solution 6: Drag and Drop 167

Solution 7: Simple Windows 199

Solution 8: Flex Tables 237

Solution 9: File Uploads 283

Solution 10: Hibernate Integration 303

Solution 11: Deployment to an External Server 325

Solution 12: GWT and Legacy Code 343Index 371


 

Read More Show Less

Product Details

  • ISBN-13: 9780132344814
  • Publisher: Prentice Hall
  • Publication date: 8/23/2007
  • Edition description: New Edition
  • Edition number: 1
  • Pages: 408
  • Product dimensions: 7.00 (w) x 9.25 (h) x 0.80 (d)

Meet the Author

David Geary is the author of eight books on Java technology, including the bestselling Graphic Java 2 Series, Advanced JavaServer Pages, and Core JavaServer Faces (all from Prentice-Hall). David was a member of Sun’s Expert Groups for the JavaServer Pages Standard Template Library (JSTL), and JavaServer Faces (JSF) 1.0. He also was the second Apache Struts committer and the inventor of the Struts Template Library, the precursor to the popular Tiles open-source framework for composing web pages from JSP fragments. David wrote questions for Sun’s Web Developer Certification Exam and is the president of Clarity Training Inc., a training and consulting company focusing on server-side Java technology.

Rob Gordon is an independent consultant specializing in the design and implementation of enterprise systems. He is a former Sun developer and author of Essential JNI and coauthor of Essential JMF.

 

Read More Show Less

Read an Excerpt

00_0132344815_FM.qxdPreface

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 ofJavaScript, HTML, CSS, and

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!

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Foreword xiii

Preface xvi

Acknowledgments xviii

About the Authors xix

Solution 1: GWT Fundamentals and Beyond 1

Solution 2: JavaScript Integration 53

Solution 3: Custom Widget Implementation 71

Solution 4: Viewports and Maps 103

Solution 5: Access to Online Web Services 133

Solution 6: Drag and Drop 167

Solution 7: Simple Windows 199

Solution 8: Flex Tables 237

Solution 9: File Uploads 283

Solution 10: Hibernate Integration 303

Solution 11: Deployment to an External Server 325

Solution 12: GWT and Legacy Code 343

Index 371

 

Read More Show Less

Preface

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!

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted February 25, 2012

    This shit is guckin awlsome

    Yeah you freakin crack

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)