tags:

views:

368

answers:

6

Do you find the Google Web Toolkit to be a useful project? Are there licensing issues?

+1  A: 

Hi Berlin, I have used it in research and have found it to be a promising technology. As for licensing, it is Apache 2.0 so this should not present an issue for you:

http://code.google.com/webtoolkit/terms.html

Adam Alexander
+1  A: 

I really, really dislike working with Javascript. (Really!) Plus, I have a background that includes UI programming with Java AWT and Swing. So I found the layout model very intuitive. Plus, I enjoyed my vacation in Eclipse with its auto-complete and debugger. The code it generated worked the same cross-browser.

I was using it inside a Rails app, so I just stuck the resulting .js file in public/javascripts, required it in my layout, and deployed as usual.

Real Javascript programmers usually hate it. The Java layout model is incredibly flexible but hard to grok the first time (second time, third time...) you see it. They also get annoyed by the compilation step.

Sarah Mei
+1  A: 

If you want a feel for the GWT community, I suggest you check out the Google Group for GWT. There's posts there pointing at pages that try to show who's using the toolkit, issues that people have run into (and solutions!).

I'm using GWT at my company, and we're having fantastic success. We've a hard requirement to produce a web based app, and there's no way we could produce what we've done without it (and still have the same over-all productivity (thanks to IDEs), feature velocity, etc...)

jgindin
+1  A: 

I'm using GWT at my current job and loving it, because I can now do with Java what the best Javascript ninjas can do.

Deferred binding, their bootstrapping and caching optimizations, and image bundles for example show how serious they are about getting a lot of performance for little extra development effort.

One word of caution, though, is to be careful with the means by which you introduce this technology into whatever you're developing. We're dealing with an old monolithic codebase that produces enormous HTML docs with a hodge-podge of embedded javascript, css, etc. I chose to introduce some GWT UI by "publishing" GWT functions into the window:

public native void publishStuff() /*-{
   $wnd.createGwtUI = @com.acme.foo.MyGwtUI::create();
}-*/;

These functions read configuration from the parent HTML document.

The stability of this solution is severely undermined by the quirks and flaws of the underlying document structure, so some folks have gotten a sour first impression of how "cross-browser" GWT really is.

Steve Reed
+5  A: 

GWT is great because it handles many of the issues with different browser which if you aren't familiar with can be quite the hassle. It also facilitates creation of the GUI into a more programmatic manner which is also a big plus from a non-web designer POV. Take a look at GWT's Showcase (which features live examples with code) to get an idea of the GUI that you can easily use (and extend). Another nice feature is that, you can easily internationalize your application (read this article for one way to do it). Also when Google compiles it they optimize the code which is a plus. Plenty of other libraries to add functionality easily as well.

You basically do anything you could have done with HTML+JavaScript (Steve Reed's example shows you how to use JavaScript within Java). You can even port JavaScript library into Java and use them like you would any Java class.

Overall, Google has done a pretty good job with it (it works wonderfully well in Eclipse and is documented). However it is the first web framework (?) that I've gotten serious into so I think it's pretty good and may be biased. Something to note though: the Hosted Mode browser is essentially Internet Explorer so you do need to compile and view it in different browser.

nevets1219
+3  A: 

We use it at Google, and although I was wary of the enormity of the process (computing the transitive closure of all Java classes used by the code, then translating into JavaScript) it has really been a seamless transition to using it for UI programming. All you have to learn are a few GWT-specific configurations (serialization policies can be rough, you have to be careful about dependencies, etc.) and then you're off and running without any consideration of GWT and its architecture.

I had no JavaScript experience when we started the project, and I still have no JavaScript experience - that's a good thing. I have never once had to inspect the JavaScript to debug my program, in part because of the great debugging tools available. You can use hosted mode, which will skip the Java --> JavaScript translation, and allow you to stay in Java in, say, eclipse, and step through it as the JavaScript would have in the browser.

Finally, as testing is absolutely the thing that will make or break your large web app, Selenium works fantastically with GWT. Selenium is a functional GUI testing framework, and does not replace unit tests, but is a really nice end-to-end test to supplement your GwtTestCases.

Kai