GWT in Action: Easy Ajax with the Google Web Toolkit (Paperback)

Robert Hanson, Adam Tacy

  • 出版商: Manning
  • 出版日期: 2007-06-15
  • 定價: $1,650
  • 售價: 6.0$990
  • 語言: 英文
  • 頁數: 600
  • 裝訂: Paperback
  • ISBN: 1933988231
  • ISBN-13: 9781933988238
  • 相關分類: Ajax
  • 立即出貨(限量) (庫存=1)

買這商品的人也買了...

相關主題

商品描述

Description

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.

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.

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.

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. Youll 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

Youll 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.

Youll 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.

 

Table of Contents

preface
acknowledgments
about this book
about the title
about the cover illustration

Part 1 Getting started

1 Introducing GWT
1.1 A walk through GWT
1.2 GWT vs. other solutions
1.3 Building your first GWT application
1.4 Summary
2 Creating the default application
2.1 The GWT application development lifecycle
2.2 Stage 1: Creating a GWT application
2.3 Summary
3 Advancing to your own application
3.1 Describing the application example
3.2 Stage 2: Developing your application
3.3 Stage 3: Testing and debugging in hosted mode
3.4 Stage 4: Compiling the code
3.5 Stage 5: Deploying the code
3.6 Stage 6: Running in web mode
3.7 Implementing application logging
3.8 Summary

Part 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 Dashboards 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.3 Handling standard browser events
6.4 Handling other event types
6.5 Implementing drag-and-drop
6.6 Summary
7 Creating composite widgets
7.1 What is a composite widget?
7.2 Composite widget development steps
7.3 Building the editable label
7.4 Creating a composite widget from other composite widgets
7.5 Creating the Dashboard composite
7.6 Summary
8 Building JSNI components
8.1 Introducing JavaScript Native Interface (JSNI)
8.2 Communicating using JSNI
8.3 Loading a JavaScript library
8.4 Wrapping a simple JavaScript library
8.5 Wrapping a complex JavaScript library
8.6 Summary
9 Modularizing an application
9.1 Creating a modularization structure
9.2 Including third-party modules
9.3 Packaging your own modules
9.4 Creating the Java package structure
9.5 Summary

Part 3 Advanced techniques

10 Communicating with GWT-RPC
10.1 Underlying RPC concepts
10.2 Implementing GWT-RPC
10.3 Project summary
10.4 Summary
11 Examining client-side RPC architecture
11.1 Structuring the client code
11.2 Examining different polling techniques
11.3 Writing custom field serializers
11.4 Summary
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
13.1 Introducing JavaScript Object Notation (JSON)
13.2 Examining GWTs JSON data objects
13.3 Creating a search component using JSON
13.4 Implementing a Yahoo Search proxy service
13.5 Summary
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.4 Altering the application for the locale
15.5 Implementing user-defined properties
15.6 Summary

Part 4 Completing the understanding

16 Testing and deploying GWT applications
16.1 Testing GWT code using JUnit
16.2 Deploying GWT applications
16.3 Summary
17 Peeking into how GWT works
17.1 Examining the compilation process and output
17.2 The GWT application-loading mechanism
17.3 Compiling Java to JavaScript
17.4 Summary
 
index

商品描述(中文翻譯)

描述

Google Web Toolkit (GWT) 是 Google 推出的一項新技術,可以將 Java 自動轉換為 JavaScript,使得 Ajax 應用程式更容易編寫和部署。《GWT in Action》是一本針對有興趣建立下一代豐富網頁應用程式的 Java 開發人員的全面教程。本書由 GWT Widget Library 的創建者 Robert Hanson 和 GWT Widget Library 的主要貢獻者 Adam Tacy 共同撰寫。

網頁正在經歷一個強調豐富網頁應用程式的新發展。這些應用程式往往難以建立,因為它們依賴於 JavaScript,而 JavaScript 缺乏 Java 的複雜物件導向結構和靜態類型,難以進行調試,並且需要處理許多瀏覽器不一致性。

2006 年 5 月,Google 發布了 Google Web Toolkit。GWT 讓開發人員可以使用 Java 創建 Ajax 應用程式。使用 GWT,您可以使用真正的物件導向語言來構建應用程式,並利用已經存在的 Java 工具,如 Eclipse。Google 將 Ajax 帶到了已經存在工具的地方,而不是試圖將工具支援帶到 Ajax。

《GWT in Action》向您展示如何充分利用這些令人興奮的新工具。這本寫得清晰明瞭的書籍充滿了實際的 GWT 範例。在構建第一個可運行的 GWT 應用程式時,您將理解 GWT 的理念。

本書首先探討了 GWT 的主要功能,包括:
- 將 Java 編譯為 JavaScript,這是 GWT 的核心特點
- 構建客戶端組件
- 方便的 JUnit 整合和測試
- 與 JavaScript 和現有 JavaScript 函式庫的互動
- 國際化

您還將了解 GWT 與其他工具包的比較。

《GWT in Action》向您展示如何設置開發環境,使用和創建小工具,與伺服器通信等等。讀者將在整本書中跟隨一個示例並迅速掌握 GWT 的基礎知識:小工具、面板和事件處理。本書涵蓋了完整的開發週期,從設置開發環境到構建應用程式,然後部署到網頁伺服器。書中詳細介紹了整個核心 GWT 函式庫,並提供了擴展函式庫的詳細示例。

您將學習到:
- 測試、調試和部署 GWT 應用程式
- 與 GWT-RPC 通信
- 檢查客戶端 RPC 架構
- 替代的 RPC 工具:HTTPRequest、RequestBuilder 和 FormPanel
- 使用 JavaScript Object Notation (JSON) 實現 GWT 的互操作性
- 使您的 GWT 應用程式靈活且易於維護

GWT 幫助您在網頁應用程式中充分利用 Ajax,而《GWT in Action》則幫助您更好地使用 GWT。

目錄

- 前言
- 致謝
- 關於本書
- 關於標題
- 關於封面插圖

第一部分 入門

- 第 1 章 介紹 GWT
- 第 2 章 建立預設應用程式

...```