Book Review: Google Web Toolkit Applications
January 2nd, 2008 - Written by in Reviews
is the latest book in the GWT library. When I first heard about the book, I knew I needed to buy it. The author, Ryan Dewsbury is well known in the GWT community as the creator of GPokr and KDice, the most popular GWT applications up and running today. I was very interested in learning what Ryan had to say about building practical GWT Applications.
The book is clearly aimed towards beginning and intermediate GWT developers, but I’m sure expert users will be able to learn some new tricks as well. The book is divided into two sections. The first five chapters provide an overview of GWT concepts and features. The last five chapters step through the process of building five different GWT applications: a Google Desktop clone, a Multi-View search application, a Blog Editor, an Instant message client/server and a Database Editor. All of the applications are designed using a model-view-controller architecture and useful patterns are highlighted. Ryan then walks through the construction of each application, illustrating relevant parts with code and diagrams. Except for some of the latter parts of the book, I like the fact that most of the code snippets are concise and easy to understand. The applications can be seen in action on Ryan’s website at http://www.gwtapps.com.
Chapter Highlights
Chapter 1 gives a brief overview of Ajax, current web technologies and where GWT fits in. There’s also a quick tutorial on building a GWT Hangman game, and the chapter ends with an overview of the various GWT packages.
Chapter 2 highlights the GWT user interface package. Each of the various GWT widgets and panels are explained in some detail. The rest of the chapter goes over the GWT Event interfaces and how to bind the widgets together.
Chapter 3 discusses how to use GWT to interact with a server. First, we learn how to use GWT’s RequestBuilder to make asynchronous calls. Then, the chapter describes how XML and JSON are used as a mechanism for passing data to and from the server. We also get our first exposure to the Same Origin Policy and learn a few techniques which enable us to integrate third party services into our GWT apps. The chapter concludes by describing the GWT-RPC mechanism.
Chapter 4 describes the process of first installing GWT and then setting up and working with the Eclipse environment to start writing GWT applications. There is a walkthrough of using the Unit Test framework to test the Multi-Search application (described in Chapter 7). There’s also a brief discussion on benchmarking and working with GWT modules. Finally the chapter ends by discussing how to deploy applications in various environments.
Chapter 5 talks about a variety of miscellaneous topics. These include:
- Back button support
- Using CSS
- Building custom widgets
- Using JSNI
- Providing Cross-Browser support
- Integrating with other Javascript libraries
- Internationalization
- Code Generation
- Improving Performance
Chapter 6 shows the first application, a Google Desktop clone. The chapter starts off with the design of the Gadget model and the Desktop views. Next, drag and drop is demonstrated to create draggable and dockable gadgets and the app’s look is improved using CSS. We see how to save user preferences using cookies and then using Google Gears. Finally the chapter describes how to integrate with other third party Javascript libraries like Google Maps and the Google Ajax API to create new and more interesting gadgets.
Chapter 7 features a Multi-Search application that aggregates the results from various search engines. The chapter gives us a more in depth discussion of using JSON as a data format and the Same Origin policy. Then the chapter concludes by showing how to integrate with various search APIs like Yahoo! search, Google Base, Flickr and Amazon Search using these techniques.
Chapter 8 shows how to build a Blog Editor application that can integrate with an existing Blogger account. The chapter describes how to interact with more complex webservices by creating a HTTP Proxy Servlet, which is another method for bypassing the Same Origin Policy. With that in place, the rest of the chapter talks about how to integrate with the Blogger API using the GData protocol.
Chapter 9 goes through the design and implementation of a simple Instant Messenger application. After an explanation of the client portion of the app, we next get a look at the various techniques for creating event based protocols over HTTP. There’s a discussion of the hanging RPC call method, but we also learn about more scalable techniques using technologies like Comet (with Tomcat) and Continuations (with Jetty).
Chapter 10 shows how to create an Ajax style Database Editor. The first part of the chapter gives a detailed look at implementing the Database Editor views. Next we see how to integrate with a backend database using three different server integration methods. The first is with a PHP server using an Action based API. The second approach uses REST to talk to a Rails based app and the third method utilizes the GWT-RPC mechanism. There is also an extensive section on writing a GWT code generator to serialize/deserialize JSON and XML.
Conclusion
Overall, I think Google Web Toolkit Applications is an excellent book. It is easy to read and does a really good job covering all the major GWT topics and more. The applications demonstrate software development best practices and cover a variety of interesting techniques. The only negative about this book is that at the time of this review, not all of the source code for the applications is available, although it looks like Ryan will have them all up soon. The book has its own and Ryan is active in answering questions. If you are really serious about doing GWT development, then you’ll definitely need to add Google Web Toolkit Applications to your reading list.
Nice review Chris. I’ve been wanting to start doing some projects with GWT and I think this book would be perfect for me. I’m going to go check it out.
Thanks for the great review Chris! I follow this site daily so it’s an honor to be mentioned here.
Also should note that the source for all of the applications is up . I’ve had a busy few weeks over the holidays but managed to get the last two chapters up today.
I hope everyone enjoys the book. I had a lot of fun writing it.
That’s great to hear Ryan. So I guess I don’t have any negatives to say then. Buy the book!
[...] Google Web Toolkit Applications Book Review – Check out my book review of the latest GWT book by Ryan Dewsbury. [...]
[...] is a free, multi-player Texas Hold’em game written by Ryan Dewsbury, author of the book, Google Web Toolkit Applications. GPokr runs tournaments which are held starting on the 1st of each month and continue till the last [...]
[...] 5 GWT LibrariesGWT Roundtable PodcastGetting started with GWT and Google GearsBook Review: Google Web Toolkit ApplicationsWho’s using [...]
nice review! Ive been looking into getting this book , and I wanted to see if it was noteworthy
[...] is a free, multi-player Texas Hold’em game written by Ryan Dewsbury, author of the book, Google Web Toolkit Applications. GPokr runs tournaments which are held starting on the 1st of each month and continue till the last [...]
I have written thorough post about why GWT is the technology choice for building products on http://tinyurl.com/azusf7 . Let me know if you can publish it here as a guest post.
Thanks