Google needs to eat their own dog food

Summary:Google developers face a bleak future trying to maintain several different code bases of obscure custom JavaScript code for Google Docs & Spreadsheets, GMail, and their other popular web applications. It's time for them to eat their own dog food and use Java and the Google Web Toolkit instead.

I'm sure you've heard by now about Google Docs & Spreadsheets, Google's combination of Writely and Google Spreadsheets. If not, go give it a try, I'll wait....

Ok. Now you probably had one of two reactions. If you were thinking "Wow, that is so cool", you can stop reading now and go back and simply enjoy the tools. I don't want to spoil the experience for you.

For the rest of you, what is wrong with this application? Why should you care? And what should be done to fix it? I'll get to that, but first: what's wrong with it.

For one thing it's not a single application. It looks like all Google did was try and synchronize the look and feel of the two applications, but it's just skin deep. What you have here is different applications, written by different people in different styles, trying but not quite succeeding in an effort to appear as one. How do I know that?

The first clue is that the applications are served from different hosts using wildly different URLs. Another is that if you look carefully at the main page, the word processor page, and the spreadsheet page, they all use slightly different text styles and spacing across the top, and margins around the edges. Some icons (such as the cut icon) are shared, but some of the buttons are different. One has "Collaborate/Publish" and one has "Discuss/Collaborate". One says "Sign Out" and another says "Sign out". Etc..

Beyond these superficial items, the real proof is in the source code. The main page and the word processor appear to be based on the Writely (or as the code says, "leftly") code base. You can tell because at the top it says "////Copyright 2005, Upstartle LLC" (Upstartle was the company that did Writely). The spreadsheets part is something else entirely. It's magic obfuscated JavaScript for the most part, except for some bootstrap script in the main document.  The style looks closer to the GMail code, but there are big differences.

So why should you care? As a user of Google applications you should care because Google is trying to maintain (at least) three different code bases using very hard to maintain JavaScript. You should care because the applications are slower than they could be. For example the code is littered with browser checks and special cases, and in some cases comments and whitespace that only takes up bandwidth.

The solution? Google should be using their own open source development framework, Google Web Toolkit (GWT). GWT "takes the pain out of Ajax" by letting you write and debug Ajax apps in portable Java and compile them into JavaScript. Rewriting Writely, Spreadsheet, and GMail with GWT would have many benefits including:

  • One code base (part of GWT) for all those tricky browser specific tests.
  • Google programmers could code in Java and use all the great tools that go with it.
  • Shared Java components would help ensure look-n-feel congruence between the different apps.
  • With the proper run-time, it would be possible to migrate these apps to the desktop for offline use.
  • GWT's compiler builds cacheable modules ahead of time for the permutations of browsers and languages that the user actually uses (and you load only what you use).
  • It takes care of obfuscation and compression of the code for the minimal payload going to the user's browser.
  • Using GWT for these high profile production apps would help the GWT community by forcing GWT to improve and mature quickly.
Currently the only Google app that uses GWT (that I know about) is the Google Image Labeler. C'mon guys, I know this would be a lot of work, but so is the bleak future of trying to maintain all that magic JavaScript code. You've shown us the future of Ajax development with GWT, now take your own advice and use it for your own web apps. Your users, not to mention all the programmers using GWT, will thank you for it.

Topics: Google

About

Ed Burnette has been hooked on computers ever since he laid eyes on a TRS-80 in the local Radio Shack. Since graduating from NC State University he has programmed everything from serial device drivers and debuggers to web servers. After a delightful break working on commercial video games, Ed reluctantly returned to business software. He... Full Bio

zdnet_core.socialButton.googleLabel Contact Disclosure

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.