Google Web Toolkit Applications

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 96%)
Other sellers (Paperback)
  • All (23) from $1.99   
  • New (6) from $25.54   
  • Used (17) from $1.99   

Overview

“Ryan clearly understands the GWT value proposition and how GWT integrates into a diverse web technology stack–and not just in a theoretical way. With the popularity of gpokr.com and kdice.com, Ryan can speak with the authority of concrete success.”

Bruce Johnson, creator of Google Web Toolkit

“This book distinguishes itself from other books on GWT in that it walks through the entire process of building several nontrivial GWT applications, not the toy applications that most books present.”

R. Mark Volkmann, Object Computing, Inc.

Google™ Web Toolkit Applications is an excellent resource for any GWT developer. Solutions to challenges commonly encountered in GWT are presented through the design and development of actual applications. The applications developed throughout the text demonstrate best practices from simple UI design all the way to custom code generation, and are presented with little pretext about the amount of Java knowledge a given developer may have. Advanced concepts are not withheld but are presented in a way that will be understood by both novice and seasoned developers alike. Good application development practices and proper Model View Controller design is reinforced throughout the book, nearly guaranteeing that the reader will come away a better programmer. “

Jason Essington, Senior Web/Java Engineer, Green River Computing

“Dewsbury’s Google™ Web Toolkit Applications is a book for both experts and beginner programmers who want to discover this open source Java software development framework, as well as write Ajax applications. A very detailed book!”

Massimo Nardone, Advisory IT Security Architect

Accelerate and Simplify Ajax Development with Google Web Toolkit

Get the edge you need to deliver exceptional user experiences with Google™ Web Toolkit Applications, a guidebook that provides web developers with core information and instructions for creating rich web applications. Whether you’re a developer who needs to build a high-performance front end for Java, PHP, or Ruby applications, or to integrate with external web services, this resource from expert Google Web Toolkit (GWT) developer Ryan Dewsbury delivers the in-depth coverage you’ll need.

In this valuable book, insider Ryan Dewsbury provides instructions for using the robust tool set and gets you on your way to creating first-class web applications by providing a comprehensive overview of GWT technology. In addition, he shares his “in-the-trenches” insights on

  • Building elegant and responsive user interfaces with Cascading Style Sheets and GWT’s Widgets and Panels
  • Creating seamless user experiences through asynchronous communication with HTTP, REST, JSON/JSONP, and RPC Interoperating with web standards–such as XML, RSS, and Atom–and web services–such as Google Maps, Amazon Books, Yahoo! Search, Flickr, and Blogger
  • Overcoming browser security restrictions, such as HTTP’s two-connection limit and the Same-Origin policy
  • Accelerating development, using software engineering, code generation, internationalization, application patterns, and Java tools
  • Deploying for optimal performance with resource compression and caching
  • Building five non-trivial applications: a gadget application with a rich drag-and-drop interface, a multi-search application that makes requests to many search engines, a blog editor application for managing entries across multiple blogs, a web-based instant messenger, and a database manager for a traditional web page

This practical guide to GWT introduces you to the technology; provides techniques, tips, and examples; and puts you on the road to delivering top-notch user experiences for your web applications.

Read More Show Less

Product Details

  • ISBN-13: 9780321501967
  • Publisher: Addison-Wesley
  • Publication date: 12/19/2007
  • Edition description: New Edition
  • Pages: 574
  • Product dimensions: 7.06 (w) x 9.24 (h) x 0.94 (d)

Meet the Author

Ryan Dewsbury is a developer, architect, and consultant who started working in C++ and Java in 1998 and has used GWT since its first release. His recent projects include developing software applications with GWT (most notably gpokr.com and kdice.com). As a consultant, Ryan helps companies develop great online user experiences using cutting-edge software.

Read More Show Less

Read an Excerpt

I’ve always had an interest in the nontechnical side of software development: the user experience. It started back when I was working on teams building the core of application servers in C++. We admired the beauty of the C++ language and its expressiveness. We made large, complex systems run seamlessly with elegant code. We marveled at our templating techniques, which made the C++ compiler churn out code just like a code generator would. Then I would leave work and was not able to mention a word of it without receiving blank stares in return.

I decided to find time to write a client-side application that would be as elegant to the user as well-written code can be for a developer. I chose to build an instant messenger application, mostly with C++, that combined the four major networks into one interface. At the time, instant messengers were becoming bloated with features—there were too many buttons distracting users from sending a simple text message. The instant messenger application I developed resulted in a much better user experience for instant messaging: instead of users downloading a 10MB application with a five-step installation process, I optimized the messenger to be 200K with a clean interface (much like the Google Talk messenger is today). As a result, it was downloaded over a million times.

While developing interfaces in C++ I was always impressed by the ease of creating a nice-looking interface on a web page. If you compare the code required to set a font in C++ to cascading style sheets, you’ll see what I mean. Then Ajax started to become popular, producing web interface behavior similar to desktop interface behavior. Combine this with theease of making things look better with CSS, and you have a much better platform for interface development.

I was really impressed when I saw Google Maps for the first time. The user experience was perfect. I simply typed maps.google.com into my browser and I was instantly provided with a fully functional map application. I could drag the map around in different directions, traveling around the world, zooming in and out without waiting for a page referesh. I had a brief look at the technology needed to do this, specifically JavaScript, and was disapointed. I knew there were limits to what you can build with JavaScript. It would be nearly impossible to build large complex client-side applications with it.

Then the Google Web Toolkit (GWT) was released, and I decided to try writing an application using it. In only three weeks I had built the client and server side for a poker application. I put it up at http://gpokr.com. You could simply type the URL into your browser and be instantly presented with a live poker game. No downloads, no installations, and the interface could be styled nicely and easily with CSS. Scott Blum, Bruce Johnson, and Joel Webber from the GWT team came by to do some “testing,” and I had the opportunity to thank them for building an incredible tool. I marveled at being able to write elegant Java code that could be transformed into JavaScript by the GWT compiler. I was really impressed by how GWT so solidly let anyone create applications that delivered great user experiences.

After GWT’s initial release, I found that its great abilities weren’t clear to many and that it would take a book with several real examples to illustrate this. I had never written a book before, and to write one on a technology that was not my specialty didn’t seem quite right. But then again, nobody specialized in GWT at this point. I believed enough in the technology to give it a shot. To make up for my lack of experience and before writing any of the chapters, I spent several months exclusively developing GWT applications to explore every part of GWT as well as every part of web technology that GWT could touch. Part II of this book presents five of these applications. What Is This Book About?

This book is about writing nontrivial Ajax applications to create great user experiences using web technologies and Java development tools, with GWT bridging the two. The book focuses primarily on the Google Web Toolkit, with an in-depth look at its library and tools. As a secondary focus, it covers software development techniques and patterns using Java, and how to apply Ajax application development with GWT. A terciary focus is on web technologies, including web standards and other Ajax libraries and APIs.Who Should Read This Book?

I’m a developer who wrote this book for other developers. Software developers who need to create user-facing applications should read this book. Most of the code in the book is based on Java, but care is taken so that the book is accessible to a beginner with the language. If you don’t know Java, you should familiarize yourself with the language before starting this book. Sun has great tutorials to get you started: http://java.sun.com/docs/books/tutorial/java/index.html.

GWT is not just an Ajax tool for Java developers. I think this view severely undercuts its true strength. Java developers will find using it easy; however, the technology is for any software developer who needs to build nontrivial Ajax applications. You could be a .NET, PHP, Ruby, or C++ developer. If you’re one of these developers you would need to learn another language to build an Ajax application whether you use GWT or not. I recommend that you learn Java—starting with the previously mentioned tutorials from Sun, and GWT through this book and the GWT documentation at http://code.google.com/webtoolkit/documentation/—instead of JavaScript. As a result, you will save a substantial amount of time debugging and maintaining the application while creating a much better user experience.Organization of This Book

This book has two parts. Part I gives you an in-depth introduction to using the Google Web Toolkit. You can use it as a reference for the GWT library or as a guide to using effective development techniques with GWT. Part II provides a thorough look at five nontrivial applications built with GWT. In this part you’ll find development patterns, techniques, and subtleties used through application design and development. Each application in this part is designed to be a balance of GWT library usage, web service and technology interoperation, application design and architecture, and user interface design. As you read through these chapters, you can follow along and construct the applications on your machine. The chapters include most of the code, but you’ll need to refer to the source code at www.gwtapps.com in certain instances that are identified.Part I: Understanding the Google Web Toolkit

  • Chapter 1, First Steps with the Google Web Toolkit, introduces web technologies, skill sets, and GWT, and includes a short tutorial on creating an Ajax game application.
  • Chapter 2, User Interface Library Overview, details the user interface library that comes with GWT. This material consists mainly of notes and examples based on the usage of each widget.
  • Chapter 3, Server Integration Techniques, describes several methods for integrating with server-side applications.
  • Chapter 4, Software Engineering for Ajax, looks at Java tools for software development and how they apply to GWT development.
  • Chapter 5, Using the Toolkit Effectively, covers some of the more advanced techniques of development with GWT, including CSS, code generation, internationalization, and performance.
Part II: Rich Web Applications by Example
  • Chapter 6, Gadget Desktop Application, presents a gadget application with a rich drag-and-drop interface, persistence with cookies and Gears, along with using JavaScript APIs with GWT.
  • Chapter 7, Multi-Search Application, shows how to create a search application that makes requests to many search engines. The application uses JavaScript Object Notation with Padding (JSONP) to communicate with Google, Yahoo!, Amazon, and Flickr.
  • Chapter 8, Blog Editor Application, walks you through an application to manage blog entries across many blogs. This application integrates with the Blogger REST API using an HTTP proxy.
  • Chapter 9, Instant Messenger Application, details a web page instant messenger based on GWT-RPC. It covers how to use an event-based protocol along with optimizing with Comet on Tomcat and Continuations on Jetty.
  • Chapter 10, Database Editor Application, looks at a database manager for a traditional web page. The application explores advanced topics such as reading complex data structures from the server using Data Access Objects, code generation for easy
Web Support

The web site for this book is located at www.gwtapps.com. It contains the source code and live demos for the sample applications, a forum for questions and error reports, and other useful reference material.

Read More Show Less

Table of Contents

Preface xvii

About the Author xxiii

Part I: Understanding the Google Web Toolkit 1

Chapter 1: First Steps with the Google Web Toolkit 3

The Emergence of Ajax 3

Rethinking Web Applications 5

Software Engineering for Ajax 8

Evaluating Your Background 11

The Importance of Application Development Skills 14

A Quick Tutorial 16

Overview of Toolkit Packages 30

Overview of GWT Applications 34

Summary 36

Chapter 2: User Interface Library Overview 37

Static Widgets 38

Form Widgets 47

Complex Widgets 63

Simple Layout Panels 70

Complex Layout Panels 80

Simple Container Panels 84

Complex Container Panels 87

User Interface Framework Glue 95

Summary 103

Chapter 3: Server Integration Techniques 105

Basic Server Integration Techniques 105

Using Data Format Libraries 117

Third-Party Server Integration 125

Advanced Server Integration Techniques 128

Summary 137

Chapter 4: Software Engineering for Ajax 139

Setting Up the Development Environment 139

Adding Projects to Eclipse 145

Writing Java Code in Eclipse 149

Debugging in Eclipse 158

Organizing Your Application Structure 164

Testing Applications 168

Building and Sharing Modules 180

Deploying Applications 183

Summary 190

Chapter 5: Using the Toolkit Effectively 191

Using Asynchronous Programming 191

Handling the Back Button 197

Creating Elegant Interfaces with CSS 200

Extending the Toolkit 212

Internationalizing Applications 226

Generating Code 235

Improving Performance 242

Summary 251

Part II: Rich Web Applications by Example 253

Chapter 6: Gadget Desktop Application 255

Using the Container Application Pattern 256

Designing the Model 257

Building a Columned Container Interface 264

Putting Gadgets in the View 274

Creating Drag-and-Drop Gadgets 283

Cleaning Up User Interfaces with CSS 290

Adding Persistency 300

Using Other JavaScript Libraries 309

Summary 318

Chapter 7: Multi-Search Application 319

Using the Aggregator Application Pattern 319

Multi-Search Design 321

The Model 322

The View 324

The Controller 331

Importing Structured Data Formats 334

Integrating with Yahoo! Search 340

Integrating with Google Base 344

Integrating with Flickr Search 348

Integrating with Amazon Search 354

Summary 358

Chapter 8: Blog Editor Application 361

Using the Workspace Application Pattern 361

Building a Web Service Client 363

Blog Editor Design 365

The Model 365

Building a Multiple Document View 367

Adding Rich Text Editing 381

The LoadingPanel Widget 386

The TitleCommandBar Widget 388

Designing the Application Controller 390

Building an HTTP Proxy Servlet 392

Integrating with the Blogger API 401

Summary 421

Chapter 9: Instant Messenger Application 423

Using the Collaborator Application Pattern 423

Instant Messenger Design 425

The Model 426

Building a Complementary Interface 429

The Controller Overview 447

Using GWT-RPC 450

Connecting to the Server 456

Adding RPC Events 458

The Instant Messenger Server 465

Using Server-Side Advanced IO 470

Summary 478

Chapter 10: Database Editor Application 479

Using the Manager Application Pattern 480

Designing the Model 482

Using Asynchronous Data Access Objects 485

Building a Two-Paned Editor Interface 488

Server Integration Overview 507

Writing a Generic GWT Code Generator 510

Integrating with Action-Based PHP Scripts 522

Integrating with a RESTful Ruby on Rails Application 530

Integrating with a GWT-RPC Servlet 542

Summary 554

Index 555

Read More Show Less

Preface

I’ve always had an interest in the nontechnical side of software development: the user experience. It started back when I was working on teams building the core of application servers in C++. We admired the beauty of the C++ language and its expressiveness. We made large, complex systems run seamlessly with elegant code. We marveled at our templating techniques, which made the C++ compiler churn out code just like a code generator would. Then I would leave work and was not able to mention a word of it without receiving blank stares in return.

I decided to find time to write a client-side application that would be as elegant to the user as well-written code can be for a developer. I chose to build an instant messenger application, mostly with C++, that combined the four major networks into one interface. At the time, instant messengers were becoming bloated with features—there were too many buttons distracting users from sending a simple text message. The instant messenger application I developed resulted in a much better user experience for instant messaging: instead of users downloading a 10MB application with a five-step installation process, I optimized the messenger to be 200K with a clean interface (much like the Google Talk messenger is today). As a result, it was downloaded over a million times.

While developing interfaces in C++ I was always impressed by the ease of creating a nice-looking interface on a web page. If you compare the code required to set a font in C++ to cascading style sheets, you’ll see what I mean. Then Ajax started to become popular, producing web interface behavior similar to desktop interface behavior. Combine this with the ease of making things look better with CSS, and you have a much better platform for interface development.

I was really impressed when I saw Google Maps for the first time. The user experience was perfect. I simply typed maps.google.com into my browser and I was instantly provided with a fully functional map application. I could drag the map around in different directions, traveling around the world, zooming in and out without waiting for a page referesh. I had a brief look at the technology needed to do this, specifically JavaScript, and was disapointed. I knew there were limits to what you can build with JavaScript. It would be nearly impossible to build large complex client-side applications with it.

Then the Google Web Toolkit (GWT) was released, and I decided to try writing an application using it. In only three weeks I had built the client and server side for a poker application. I put it up at http://gpokr.com. You could simply type the URL into your browser and be instantly presented with a live poker game. No downloads, no installations, and the interface could be styled nicely and easily with CSS. Scott Blum, Bruce Johnson, and Joel Webber from the GWT team came by to do some “testing,” and I had the opportunity to thank them for building an incredible tool. I marveled at being able to write elegant Java code that could be transformed into JavaScript by the GWT compiler. I was really impressed by how GWT so solidly let anyone create applications that delivered great user experiences.

After GWT’s initial release, I found that its great abilities weren’t clear to many and that it would take a book with several real examples to illustrate this. I had never written a book before, and to write one on a technology that was not my specialty didn’t seem quite right. But then again, nobody specialized in GWT at this point. I believed enough in the technology to give it a shot. To make up for my lack of experience and before writing any of the chapters, I spent several months exclusively developing GWT applications to explore every part of GWT as well as every part of web technology that GWT could touch. Part II of this book presents five of these applications.

What Is This Book About?

This book is about writing nontrivial Ajax applications to create great user experiences using web technologies and Java development tools, with GWT bridging the two. The book focuses primarily on the Google Web Toolkit, with an in-depth look at its library and tools. As a secondary focus, it covers software development techniques and patterns using Java, and how to apply Ajax application development with GWT. A terciary focus is on web technologies, including web standards and other Ajax libraries and APIs.

Who Should Read This Book?

I’m a developer who wrote this book for other developers. Software developers who need to create user-facing applications should read this book. Most of the code in the book is based on Java, but care is taken so that the book is accessible to a beginner with the language. If you don’t know Java, you should familiarize yourself with the language before starting this book. Sun has great tutorials to get you started: http://java.sun.com/docs/books/tutorial/java/index.html.

GWT is not just an Ajax tool for Java developers. I think this view severely undercuts its true strength. Java developers will find using it easy; however, the technology is for any software developer who needs to build nontrivial Ajax applications. You could be a .NET, PHP, Ruby, or C++ developer. If you’re one of these developers you would need to learn another language to build an Ajax application whether you use GWT or not. I recommend that you learn Java—starting with the previously mentioned tutorials from Sun, and GWT through this book and the GWT documentation at http://code.google.com/webtoolkit/documentation/—instead of JavaScript. As a result, you will save a substantial amount of time debugging and maintaining the application while creating a much better user experience.

Organization of This Book

This book has two parts. Part I gives you an in-depth introduction to using the Google Web Toolkit. You can use it as a reference for the GWT library or as a guide to using effective development techniques with GWT. Part II provides a thorough look at five nontrivial applications built with GWT. In this part you’ll find development patterns, techniques, and subtleties used through application design and development. Each application in this part is designed to be a balance of GWT library usage, web service and technology interoperation, application design and architecture, and user interface design. As you read through these chapters, you can follow along and construct the applications on your machine. The chapters include most of the code, but you’ll need to refer to the source code at www.gwtapps.com in certain instances that are identified.

Part I: Understanding the Google Web Toolkit

  • Chapter 1, First Steps with the Google Web Toolkit, introduces web technologies, skill sets, and GWT, and includes a short tutorial on creating an Ajax game application.
  • Chapter 2, User Interface Library Overview, details the user interface library that comes with GWT. This material consists mainly of notes and examples based on the usage of each widget.
  • Chapter 3, Server Integration Techniques, describes several methods for integrating with server-side applications.
  • Chapter 4, Software Engineering for Ajax, looks at Java tools for software development and how they apply to GWT development.
  • Chapter 5, Using the Toolkit Effectively, covers some of the more advanced techniques of development with GWT, including CSS, code generation, internationalization, and performance.

Part II: Rich Web Applications by Example

  • Chapter 6, Gadget Desktop Application, presents a gadget application with a rich drag-and-drop interface, persistence with cookies and Gears, along with using JavaScript APIs with GWT.
  • Chapter 7, Multi-Search Application, shows how to create a search application that makes requests to many search engines. The application uses JavaScript Object Notation with Padding (JSONP) to communicate with Google, Yahoo!, Amazon, and Flickr.
  • Chapter 8, Blog Editor Application, walks you through an application to manage blog entries across many blogs. This application integrates with the Blogger REST API using an HTTP proxy.
  • Chapter 9, Instant Messenger Application, details a web page instant messenger based on GWT-RPC. It covers how to use an event-based protocol along with optimizing with Comet on Tomcat and Continuations on Jetty.
  • Chapter 10, Database Editor Application, looks at a database manager for a traditional web page. The application explores advanced topics such as reading complex data structures from the server using Data Access Objects, code generation for easy XML and JSON, and integrating with PHP, Ruby on Rails, and Java with Hibernate.

Web Support

The web site for this book is located at www.gwtapps.com. It contains the source code and live demos for the sample applications, a forum for questions and error reports, and other useful reference material.

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

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