Frank Sommers What is the Google Web Toolkit?
Frank Sommers: Can you walk us through the steps of developing an application with GWT?
Frank Sommers: How does the compiler work?
We take advantage of strong types in Java to do this. With a more dynamic language, it would be quite difficult, if not impossible. Obviously, there are more dynamic features in Java, but for the vast majority of GWT applications, the reason the applications can come out compact and so efficient is because we take advantage of very aggressive static analysis.
Frank Sommers: What Java classes can be used in a GWT application?
We released a windowing toolkit that's analogous to SWT or Swing, and is optimized for the Web. You write your user interface against that class library. But you don't have to [use that]. People have written their own custom class libraries on top of that, but we have a really good base level of Web UI widgets you can program against.
Then we have a number of classes that allow for remote procedure calls, or communication with a server. We have a servlet class you can subclass that becomes an RPC endpoint on the server. You can make calls to that from the client, and it will do all the serialization and de-serialization for you. You essentially just pass objects back and forth.
Frank Sommers: How about support for REST or SOAP?
Bret Taylor: We have a demo application that shows how you can take a REST interface and use JSON as your wire format for remote procedure calls. There also other community examples where people have used [GWT] for SOAP.
Bret Taylor: Looking at these technologies purely from a programming model perspective is probably not the best thing. What we like to think of at Google is, what is the best user experience? Ajax has a lot of potential to make the user experience better and more interactive. For something like Gmail, we really leverage Ajax for performance. We pre-fetch messages so that when you click on them we don't need to do any round-trips to the server. With Google Maps we dynamically download new map tiles so you don't need to re-download part of the map that you've already seen.
The optimal toolkit—and GWT is certainly not the best for every case—combines the programming model and the user experience most effectively. We tried to do that [with GWT], optimizing for things like download size, or how much can we reduce client-server interaction, and combined that with a programming model that hopefully is very familiar to Java developers.
We currently use GWT in a number of our own projects. GoogleBase uses it. If you buy a product with Google Checkout, you'll end up on a number of pages that were built with GWT. There are other less-known examples, and there are a number of internal projects that I can't tell you about.
Frank Sommers: Can you tell us about the recent release?
Bret Taylor: We had a release last week that supports development on Mac OS X. The hosted Web browser I described earlier didn't run on Mac OS X, and now it does. Now, you can develop your application on Windows, Linux, or the Mac, and you can deploy it on all browsers and environments that are in common use. It's one of the most platform-independent products Google has, and we're really proud of that.
We also did a number of performance improvements, particularly for the hosted Web browser. When you're doing the edit-debug-refresh cycle, it's about ten to twenty times faster. We did a lot of work on how quickly we can compile changes, and incorporated that into the hosted Web browser—some very sophisticated work by our engineering team.
Frank Sommers: What's the licensing of GWT?
Bret Taylor: The libraries and most of the code that you use to develop your application are released under the Apache 2.0 license. The compiler is closed-source, but is completely free.
Frank Sommers: How does a project like GWT fit into Google's overall business?
Bret Taylor: We have a few separate developer efforts. One is releasing APIs for Google's products. Probably the most talked-about one is the maps API that lets you incorporate Google Maps into your own Web pages. We have others, too, that we released in the past few years, such as the Google Base API that lets you put your listing into Google base very easily, we have the Google Calendar API that a number of people have written calendar syncing tools for, and we're really trying to open up all, or a lot of, our products so that they can be extended and improved by developers.
Along with that, we're focusing on things like GWT, or general-purpose developer tools that improve the state of Web application development. We have the view that what's good for the Web is good for Google. At the end of the day, the more people use the Web, the more searches they do on Google. We found that Ajax improved the state of our applications so well, and that it was a difficult thing for developers to get right, that we are really committed to releasing some of the technologies we use to make Ajax development work so that the state of Web applications get better. That's why we support a lot of open-source projects, because that's really the foundation of the Internet, and we want to continue to support that ecosystem.