Accelerated GWT: Building Enterprise Google Web Toolkit Applications

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

I found this book to be a quite good accelerated overview. It covers all the core concepts (RPC, widgets, projects, CSS) with useful and understandable examples. It covers advanced topics like custom serialization, the details of CSS, and a lengthy piece on internationalization with a good localization example. In comparison, GWT in Practice (although a good book) left me not understanding the client side as well as I'd like. The criticisms from the other reviewers are fair, but this book deserves a much higher score. It was worth the time I put into it. GWT 2.0 is out, and this is still a good book. The UiBinder is not covered, of course, but the core concepts are still mostly relevant with only a few deprecated topics covered.

Author(s): Vipul Gupta
Edition: 1
Publisher: Apress
Year: 2008

Language: English
Pages: 299

Contents at a Glance......Page 3
Contents......Page 4
About the Author......Page 11
Acknowledgments......Page 12
Introduction......Page 13
Contacting the Author......Page 14
GWT Basics and a First Application......Page 16
Web Mode......Page 17
Hosted Mode......Page 18
Tools for Creating a Project......Page 19
projectCreator......Page 20
applicationCreator......Page 21
Running the Application Using Generated Scripts......Page 22
Structure of a Module File......Page 24
Understanding Different Tags in a Module File......Page 25
Creating the Host HTML File......Page 28
Steps to Create a GWT Application......Page 29
Adding the Module File......Page 30
Creating the Entry-Point Class......Page 31
Creating the Host HTML File......Page 34
Understanding and Using GWTShell......Page 35
Summary......Page 38
Development Tools Explained......Page 39
The JRE Emulation Library......Page 40
What Version of the Java Language Does the GWT Support?......Page 43
Same Origin Policy Explained......Page 45
Deferred Binding......Page 46
Understanding Generator, Related Classes, and Code Generation Using Generators......Page 48
PropertyFileReader Example Explained......Page 51
Start by Creating a Sample Project......Page 52
Creating the Interface for PropertyFileReader Application......Page 53
Writing the Generator Class......Page 55
Writing the Entry-Point Class......Page 61
Running the Application......Page 63
GWT: Startup/Bootstrap Process......Page 64
Summary......Page 67
GUI Building with Fundamental Widgets......Page 69
The UIObject Class......Page 70
The Widget Class......Page 73
The ButtonBase Class......Page 74
How Do You Use the Widgets Provided by GWT?......Page 75
The CheckBox Widget......Page 76
The PushButton Widget......Page 77
The TextArea Widget......Page 78
The ListBox Widget......Page 79
Understanding Layouts Using Panels......Page 80
Aligning Widgets Using a CellPanel......Page 82
Understanding and Using a HorizontalPanel......Page 83
Understanding and Using a VerticalPanel......Page 84
Understanding and Using a DockPanel......Page 85
Understanding and Using a Grid......Page 86
Understanding and Using a FlexTable......Page 87
What Is a FlowPanel?......Page 88
Creating Complex Widgets Using Composites......Page 89
Creating the Composite......Page 90
Creating the Host HTML File......Page 94
Creating the Entry-Point Class......Page 95
Summary......Page 96
Understanding RPC......Page 98
Creating Service Interface (Also Called the Synchronous Interface)......Page 99
Understanding the AsyncCallback Interface......Page 100
Making an Actual Remote Procedure Call......Page 101
Your First Complete RPC Example......Page 102
RPC in GWT: Behind the Scenes......Page 109
Summary......Page 112
Handling Events Generated by Widgets......Page 113
Example of Using Listeners......Page 115
Handling Events Using Adapter Classes......Page 116
Example of Using Adapter Classes......Page 117
Styling Applications Using CSS......Page 118
How Do Nested CSS Classes Apply to GWT Widgets?......Page 119
Including Style Sheets in Your GWT Application......Page 120
Creating a CSS File......Page 121
Using the TabBar Widget......Page 122
Using the TabPanel Widget......Page 124
Optimizing Applications Using ImageBundle......Page 127
Understanding AbstractImagePrototype......Page 128
Creating the ImageBundle Interface......Page 129
Setting Up the Host HTML Page for the Application......Page 130
Writing the Entry-Point Class......Page 132
Running the Sample Application......Page 135
How Does an ImageBundle Work?......Page 137
Building Classic HTML Forms Using FormPanel......Page 138
Sample Application Demonstrating the Use of FormPanel......Page 139
Summary......Page 142
What Is Serialization?......Page 143
Designing an RPC Application......Page 144
Creating the Domain Objects Used for Communication......Page 146
Handling UI Events......Page 147
Defining the Service and Asynchronous Interfaces......Page 148
Creating the Callback Classes......Page 149
Creating the Controller Class......Page 150
Mapping the Server-Side Path in the Module’s XML File......Page 152
Running the Application......Page 153
Serializing Collection Classes......Page 154
Creating the Domain Objects......Page 155
Writing the Service and Async Interfaces......Page 156
Creating the Controller Class......Page 158
Creating the Entry-Point Class......Page 159
Creating the Server-Side Implementation of the Service Interface......Page 164
Creating the CSS Style Sheet for the Application......Page 166
Writing the Host HTML File......Page 167
Running the Application......Page 168
Example of Using HashMap......Page 169
Understanding the SerializationStreamWriter Interface......Page 170
Understanding the SerializationStreamReader Interface......Page 171
Communicating with Server Using HTTP Requests......Page 174
Summary......Page 176
Testing GWT Applications......Page 179
Creating Sample Tests Using the junitCreator Utility......Page 180
Writing GWT-Based Unit Tests......Page 182
Examining the GWTTestCase Class......Page 183
Creating Tests Without Using the junitCreator Utility......Page 186
Running the Tests......Page 187
Steps to Run the Tests from Eclipse......Page 188
Points to Remember While Creating a JUnit-Based GWT Test Case......Page 192
Testing by Using a Timer Object......Page 193
Example of Using a Timer Object......Page 194
Testing by Using a Mock Callback Object......Page 195
Example of Using a Mock Callback Object......Page 196
Using the Benchmark Utility and Writing Tests for Gathering Benchmark Results......Page 197
Examining the Benchmark Class......Page 198
Examining the IntRange Class......Page 199
Sample Application for Benchmarking......Page 200
Summary......Page 207
What Is Internationalization?......Page 209
Things to Remember While Developing an Internationalized Application......Page 210
Unicode......Page 211
The I18N Module......Page 212
Static String Internationalization......Page 213
Dynamic String Internationalization......Page 214
Understanding Locale-Specific Substitution of Values......Page 215
Setting and Using the Locale Value in Your Application......Page 216
Creating Your First Internationalized Application......Page 217
Creating the Project Structure......Page 218
Working with the Properties Files......Page 219
Generating the Interface Corresponding to Property Files......Page 220
Setting Up the Host HTML File......Page 221
Setting the Module’s Entry-Point Class......Page 222
Running the Application......Page 223
Example of Using the Constants Interface......Page 226
Format of Methods in the Interface Extending the Constants Interface......Page 228
Creating an Entry-Point Class to Access the Interface......Page 229
Creating a Custom Interface......Page 230
Working with the Properties Files......Page 231
Creating an Entry-Point Class to Access the Interface......Page 232
Creating the Messages Interface Using i18nCreator......Page 233
Exploring the ConstantsWithLookup Interface......Page 234
Embedding Data into Your Host HTML Pages......Page 236
Examining and Using the Dictionary Class......Page 237
Examining the NumberFormat Class......Page 238
Examining the DateTimeFormat Class......Page 239
Summary......Page 240
Some Important, Not-toBe-Missed Techniques......Page 241
Understanding the History Mechanism......Page 242
Steps to Add History Support......Page 243
Adding History Support to an Application......Page 244
The Hyperlink Widget and Its Integration with the History Mechanism......Page 252
Default Directory Structure of a Web Application......Page 253
Steps for Deploying a GWT Application on a Web Server......Page 254
Maintaining Server Sessions with a GWT Application......Page 257
Modifying the RemoteService and Its Asynchronous Version......Page 258
Introducing the Callback Class Corresponding to the New Service Method......Page 259
Adding the Server-Side Implementation for the New Service Method......Page 260
Modifying the Util Class to Support the New Method......Page 261
Running the Application......Page 262
Creating an ImageBundle of Bundles......Page 264
Understanding and Using the Tag......Page 266
Packaging a GWT Module for Reuse......Page 267
Steps to Package an Application as a Reusable Module......Page 268
Using the New Module in a Sample Application......Page 269
Summary......Page 270
Understanding the Major Changes in Version 1.5......Page 273
Setting Up Your Environment for Using Version 1.5......Page 274
Testing the New Release......Page 275
Setting Up and Running the BookStore Example on the New Version of the Library......Page 277
Type-Safe Collections by Using Generics......Page 279
The Type-Safe AsyncCallback Object......Page 280
The New Annotations for Benchmark Tests......Page 282
The New Resource Annotation for ImageBundle......Page 286
Exploring the Output Structure of Compilation with the New Release......Page 288
Summary......Page 290
Index......Page 291