InfoQ

News

Interview: Bruce Johnson discusses Google Web Toolkit

Posted by Ryan Slobojan on Dec 29, 2007 12:00 PM

Community
Java
Topics
Javascript,
Compilers,
Code Analysis,
Web Frameworks,
Open Source
Tags
GWT

Google Web Toolkit (GWT) tech lead Bruce Johnson discusses the design of GWT, how GWT converts Java into JavaScript, community involvement with GWT, new features in GWT 1.4, and the philosophy behind GWT.

Watch Bruce Johnson discusses Google Web Toolkit (11 minutes).

From the interview:

I guess maybe people's first impression was: "This is a sort of translator"; it was a little dismissive until they got to see what it was really doing under the covers. They assumed that we were somehow blindly translating a particular Java construct into something in JavaScript, so that it would lead to bloated code and so on. Actually we take a much more computer science-y, and more aggressive approach to that which is that we parse all the Java source together and do some pretty aggressive optimizations on it. We disallow reflection and dynamic class loading, intentionally. The advantage of that is you can do whole-program optimizations when you know that there aren't pieces that are not analyzable by the compiler. Reflection kind of defeats full static analysis since you never really know what is going to happen until runtime, but if you take that out of the equation, you can compile a large source code base of Java and if you compile it monolithically then you can analyze every single call site, every method implementation.

You can identify things that appear polymorphic but really aren't, we call that "type tightening". Once you do that you eliminate polymorphism, you rewrite call sites and translate polymorphic dispatches into static dispatches and once you do that you can inline the code which allows you to do another iteration of other optimizations. So it is a real compiler and we've really only scratched the surface with the optimizations I mentioned and there are a lot more cool optimizations that we can do in the future. The benefit to GWT users is that all they have to do is upgrade the new version of GWT, recompile and they get a huge benefit in either size or speed or both. For example in 1.4 which is the next upcoming GWT release, a simple recompile will gain you about 20% size reduction and faster start-up time.

4 comments

Reply

Can anyone play the video by Toby Jee Posted Dec 31, 2007 10:35 PM
Re: Can anyone play the video by Toby Jee Posted Dec 31, 2007 10:37 PM
Re: Can anyone play the video by Przemyslaw Rudzki Posted Jan 6, 2008 5:23 AM
Re: Can anyone play the video by Milen Kostadinov Posted Jan 11, 2008 1:28 PM
  1. Back to top

    Can anyone play the video

    Dec 31, 2007 10:35 PM by Toby Jee

    Hi guys, Tried to play the video but it doesn't work. Just wondering if its just me, can anyone play the video?

  2. Back to top

    Re: Can anyone play the video

    Dec 31, 2007 10:37 PM by Toby Jee

    Sorry my bad. I'm able to play it. False alarm. :P

  3. Back to top

    Re: Can anyone play the video

    Jan 6, 2008 5:23 AM by Przemyslaw Rudzki

    It only plays first 2 seconds then it dies.

  4. Back to top

    Re: Can anyone play the video

    Jan 11, 2008 1:28 PM by Milen Kostadinov

    After 2-3 page refresh..the video start :)

Exclusive Content

Intentional Software - Democratizing Software Creation

Business users doing programming? Simonyi and Kolk presents how Intentional Software offers a radical new software approach that separates business knowledge from software engineering knowledge.

Getting Started with Grails

Jason Rudolph discusses Java/Grails integration, Grails plugins, creating a Grails sample application, Grails app structure, data querying and persistence, validation, controllers and tag libraries.

Creating Product Owner Success

The Scrum Product Owner role is powerful, valuable and challenging to implement. It brings healthier relationships between customers and developers, and competitive advantage - if you do it right.

Book Excerpt and Interview: Effective Java, Second Edition

Effective Java, Second Edition by Joshua Bloch is an updated version of the classic first edition, which won a 2001 Jolt Award. InfoQ asked Bloch questions about the areas that the new edition covers.

Tapestry for Nonbelievers

A new article by I. Drobiazko and R. Zubairov introduces v. 5 of the Apache Tapestry component-oriented web framework. The tutorial shows how to create a component and covers IoC in Tapestry and Ajax.

Pete Lacey on REST and Web Services

In this interview, Burton Group consultant Pete Lacey talks to Stefan Tilkov about his disillusionment with SOAP, his opinion on REST, and addresses some of the perceived shortcomings REST vs. WS-*.

Business Natural Languages Development in Ruby

Jay Fields presents his concept of Business Natural Languages - a type of Domain Specific Languages geared towards being readable by domain experts.

Distributed Version Control Systems: A Not-So-Quick Guide Through

Adoption and interest for Distributed Version Control Systems is constantly rising. We will introduce the concept of DVCS and have a look at 3 actors in the area: git, Mercurial and Bazaar.