Google opens up to outside contributors

Google opens up to outside contributors

Summary: Making good on earlier promises, Google has opened up development of the Google Web Toolkit and accepted its first outside contributor. In this interview with ZDNet, Sandy McArthur talks about the pros and cons of GWT, plus why (and how) he became a contributor for Google.

SHARE:
TOPICS: Open Source
4

A few weeks ago, GoogleGoogle Web Toolkit opened up development of their Google Web Toolkit and released the whole system under the Apache license. Now they've taken the next logical step, by accepting their first outside contributor to the project: Sandy McArthur. I caught up with Sandy after the announcement to ask him about the pros and cons of GWT, why a web developer should consider it, and how they can get started.

[ZDNet] What drew you to GWT in the first place?

[Sandy] Java is my favorite language because I prefer it's structure and rigidness. It protects me from myself and I believe I write better code the first time when I write in Java than if I'm using a loosely typed language or less defensive ones such as C/C++. Also, anyone who has used IntelliJ IDEA (and to a lesser extent Eclipse & NetBeans) will be able to tell you that the claimed weaknesses of a strict, strongly-typed language are actually strengths because of how the tools can assist you.

A significant portion of my programming at work is web related and pressure to provide AJAX-esque features in webapps eventually got me to make time to prototype some crude user interfaces with GWT. Previously, I'd try a different AJAX toolkit about every month looking for one that fit me. I only wish I'd given GWT a try a few months earlier.

[ZDNet] So it was love at first sight?

[Sandy] Actually, when I first read about GWT I was not impressed. I didn't believe that the Java to JavaScript indirection GWT provides was really a good thing. (See Joel's Law of Leaky Abstractions for more on that.)

But then after using GWT for a while I realized GWT is not strictly Java and that GWT works well. This is a bit confusing since GWT feels at lot like Java and is sold as a Java platform so people can better wrap their brains around it. That isn't a negative for GWT, its similarity to Java is what lets you use many of the programmer's existing Java skills and allows them to use many of the powerful tools Java already has. 

[ZDNet] What do you use it for now?

[Sandy] Mostly work related projects, and since Google open sourced the compiler I've enjoyed learning about it and trying to improve it.

[ZDNet] Fill in the blank: GWT is the greatest thing since ____?

[Sandy] ... since XmlHttpRequest became available in all common browsers.

There are many things better than GWT. (Sex, drugs, and rock and roll to name a few. :-) ) It's just DHTML and XmlHttpRequest are the foundation of AJAX and GWT is the next best thing in that context. [continued on page 2...]

[ZDNet] You put a lot of time into GWT. Why did you want to become a contributor?

[Sandy] I enjoy programming. Like many people enjoy solving puzzles, I get a satisfaction from solving programming puzzles. If figure if I'm going to spend a chunk of my spare time programming, it may as well be in places that provide the most benefit (to me at least). The programming I do at work isn't all fun, but if I can sometimes incorporate the code I've written for pleasure at work too then it makes the more mundane code less tedious. Other times I'm just unfamiliar with something and want an excuse to figure it out.

I would like Google to accept my contributions for all the riches, fame and glory that will come with getting a patch accepted. :-) Actually, I'd be happy even if they reject my patches so long as they give some reason why so I can learn from it. If I'm going to hack on something and think I've come up with an improvement I take the steps to contribute it back to the original project. I'm not sure how many projects have accepted patches from me but it's probably in the 10 to 15 range.

[ZDNet] Was becoming a contributor a complex process? Did you have to assign joint copyright to Google?

[Sandy] Basically just sent in a Contributor License Agreement (CLA). As far as I can tell Google has adopted the exact same process and language as the Apache Foundation uses. Since I'm also a member of Apache's Jakarta Project I've been through this process before and figured out all the hard parts already.

The hardest part for me was figuring out what rights your employer has over code you create even when you aren't on their clock. Every few years you read about a nasty lawsuit between an employer and employee over who has rights to an application that the employee claims was written in their spare time. My employer has been kind enough to acknowledge that I contribute to various open source projects (some that are also work relevant) and I have it in writing that they make no claims on that work. If my employer was less permissive or wanted to pay me to work on open source projects I'd need a Corporate CLA.

I strongly suggest anyone who contributes to open source projects and is employed to work this out with their employer for their protection and the project's protection. If you are starting a new job, this is a question you should ask them during your interview.

[ZDNet] What's the purpose of a CLA? Did you have to assign joint copyright to Google?

[Sandy] The CLAs basically put in writing that I understand I own or have the permission to contribute the code I am contributing and that I give Google the rights they need to distribute the code too. My understanding is that code I contribute is then copyrighted by Google but that isn't an exclusive copyright, meaning that I also have a copyright on that same code I wrote and am free to do whatever I want with it except revoke their right to use the contributed code. Details are available here.

[ZDNet] What's the next step for you? Writing a book? Maybe getting hired by Google to work on GWT?

[Sandy] I don't have a desire to write a book. I'm not sure I'd be a good author. I think I'd be a decent instructor but books don't have the real-time feedback that lets me constantly adjust like working directly with people does.

As for working for Google, I'm fortunate to be in a good place in my life right now. But if someone at Google thought we'd benefit each other I'd seriously consider it. (Who wouldn't? Fortune says it's the best place to work.) [continued on page 3...

[ZDNet] What do you see as GWT's niche? 

[Sandy] GWT is great for new Java webapp projects that need rich webapp functionality. It needs to own the page which is why I don't think it may be the best for for established projects.

(Update: Google says GWT works fine in existing projects; see their comments in the Talkback section. -Ed) 

Late last fall I spent about an hour and a half showing a friend GWT. In that time I was able to show him everything from creating a project to recreating one of his more complex web interfaces he works on and connect it to a server with RPC. I was already somewhat familiar with GWT but I still think that is really amazing.

The attraction for me is how similar GWT is to Java. I believe people who prefer Java will prefer GWT for rich webapp development. People who don't like strongly typed, structured languages such as Java won't like GWT and will probably prefer pure JavaScript solutions.

[ZDNet] How easy is it for a developer to get up to speed with GWT?

[Sandy] It depends. If you are a Java programmer than it isn't bad at all. There are parts where GWT is different than Java and if you have good tools they can assist you. Since GWT is young, the GWT specific tools aren't mature but the tool smiths out there are improving their products at an impressive pace. You also need to be able to write CSS else your webapps will be plain. Both of those issues are being addressed by tool smiths and Google.

I suggest that people who want to get started with GWT first try to run each of the examples in the hosted mode browser. That way you know GWT is installed and working correctly and that you know how to launch it. Then figure out where in the source the text for a button is, change it and click reload in the hosted mode browser. You don't have to recompile and relaunch the hosted mode browser, it detects changes in real time which speeds up that write code and test it cycle much like if you were using a dynamic language.

Then take a straightforward but non-trivial part of something they've written before and try to reimplement the user interface using GWT. If you don't have something pick one of the example projects and mimic it. This will help you learn your way around the GWT widget set and give you a clear target so you can focus on learning GWT's APIs.

[ZDNet] What does the full open sourcing of GWT mean for it in the future?

[Sandy] It helps people feel secure that using GWT isn't as risky as using a closed source technology and should help adoption some but not much because the "full open sourcing" of GWT didn't change it's quality or price. By being open source, then if Google disappears or loses interest in GWT then others can carry it on.

[ZDNet] Would you use a framework that was not open source? Why or why not?

[Sandy] Sure, I think you should use the best tool for the job and you or your team. Open source or close source isn't a direct factor for me. What open source has going for it is that it often has a low barrier of entry. I don't have to ask for a budget line to use something that is free and because of that I'll prefer the free tools or tools with free trials. Other times the non-free tools really are worth their price. The most important factors for me in a framework are that it works and that it is well documented.

While I'm somewhat passionate about Java, and now GWT, I don't think people should let passion affect their technical decisions. It's a hard thing to do but too many people don't even try to be unbiased. I know people who are passionate about open source products and people who are passionate about various commercial products. In both cases I think those people tend to make sub-optimal technical decisions about a third of the time. It'd be better for everyone if we could lower that percentage.

Sandy McArthur works for Computing and Networking Services: http://www.cns.ufl.edu/ at the University of Florida in Gainesville, Florida. He lives with his wife and dog and is eagerly awaiting their first born this summer. He splits his spare time between disconnecting in the outdoors and programming for pleasure. He currently contributes to Apache's Jakarta project and recently the Google Web Toolkit project.

Topic: Open Source

Ed Burnette

About Ed Burnette

Ed Burnette is a software industry veteran with more than 25 years of experience as a programmer, author, and speaker. He has written numerous technical articles and books, most recently "Hello, Android: Introducing Google's Mobile Development Platform" from the Pragmatic Programmers.

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

Talkback

4 comments
Log in or register to join the discussion
  • Uggggh!

    Apart from the insanity of using a browser as a development platform and the fact that a lot of these Java fanboys and script kiddies didn't really experience any decent development environments (such as MS's Visual series) - so anything looks good, my main question is why does it look so bad?

    I mean, take a look at the demos for the GWT. Yes they are as bad as Google and Gmail, which look like refugees from the late 80s or maybe early 70s. Is it possible to build anything that looks like a new millenia app? I mean even Web based Outlook looks modern - more than I can say for most Ajax apps.
    TonyMcS
    • Needs a graphic artist

      Most of the demos were written by programmers. If you want 'a new millenia app', the look is controlled by style sheets, fonts, colors, and graphics. For a commercial-quality product you need to hire a graphic artist. This isn't a function of the toolkit used.
      Ed Burnette
  • Comments from Google

    Chris Ulbrich from Google wrote me to comment on a couple things in the article.

    Sandy said "GWT is great for new Java webapp projects that need rich webapp functionality. It needs to own the page, which is why I don't think it may be the best for established projects..."

    Chris notes that "Actually, GWT does not have to take over the entire page. We've worked very hard to make sure that GWT works well inside existing projects as well as in full-page GWT apps. (Of course, we're always open to ideas about improving this integration.)"

    Also Chris wanted to emphasize that anyone can contribute to GWT. "All it takes is to sign the CLA," he says, "We don't make potential contributors go through a screening process. Certainly, becoming a committer is more involved".

    For more info on contributing to GWT see: http://code.google.com/webtoolkit/makinggwtbetter.html
    Ed Burnette
    • s/needs/strongly likes/

      GWT can be used to decorate a page with rich functionality but it's ability to decorate existing pages is not as flexible as many of the other competing AJAX toolkits.

      GWT's Widgets need to own the entire life cycle of the HTML DOM elements as opposed to being able to work with an existing elements. You cannot take an existing input box and attach a GWT Widget to it. You have to remove the existing input box element and add the new TextBox Widget in it's place.

      That example isn't a huge deal but if your existing web app pre-fills that input box with your last search phrase or the browser auto completes it at page load, the programmer is going to need to capture that value and pre-load it into the TextBox Widget else the user will be annoyed.

      Also, GWT only allows itself to be loaded once into a page. So you cannot use GWT to enhance a part of a page and then load that enhancement in every existing page of your webapp unless that is the only place you use GWT. As soon as you want to enhance another part of some page then you'll have to compile a variation that includes both enhancements. The more permutations of enhancements the more variations you'll need to compile with GWT. Alternatively you could compile all the enhancements into one GWT module and load it every time regardless if that page will make use of everything compiled in.

      Technical nits aside, my personal opinion is that a developer who wants to add some AJAX-like spice to an existing web application will be better off with another AJAX toolkit such as Dojo/Prototype.js/YUI/etc. A developer who wants to AJAX-ify their whole existing webapp would be better reimplementing the interface with GWT as opposed to other toolkits out there.
      Sandy McArthur