|

Google Web Toolkit

gwt logo

After I got back from Google I/O, I mentioned Google Web Toolkit was something they showed off that I was very impressed by. It allows you to build complete AJAX applications using Java. In one of my grad classes this semester, we had the opportunity to use Google Web Toolkit (GWT) on a semester long project. After using it I’ve come to the conclusion that is it great, but I’m not sure I would use it for a normal web design project.

First, here is a sample GWT project I made called “The Decider.” It allows you to add items to a list and then the program will randomly select one for you. This is all done completely asynchronously. I was able to implement it completely in Java (which I think is easier than javascript) and then build the HTML around it using GWT’s ‘Widget’ classes. Again, you’re using Java to build the interface (without using Java Swing). This takes a little getting used to, but you can pick up pretty quickly after reading GWT’s documentation. A nice thing about the widgets is they all have their own CSS class assigned to them, and there are methods that allow you to add, remove, and override CSS classes. You can also build an HTML page with your own CSS id’s and dynamically add things to them with GWT.

GWT is great is you’re unfamiliar with web design and you want to showcase some project your doing on the web. Google’s default styles look nice and you can really focus on the functionality, especially if the scope of the project didn’t include a web based implementation. It’s also good if you want to roll out a completely asynchronous UI relatively quickly. With The Decider, I didn’t have to worry about the advanced javascript stuff, using something like Dojo or JQuery, etc. I just wrote in Java, which I am pretty comfortable with. However, if from the outset you know you want to make a web app, I’d recommend doing it the traditional way. Writing your own HTML and CSS is semantically correct and less bloated than a GWT project. But of-course, I’m a web developer first, and I just have my feet wet with GWT. I’m willing to bet with a little extra time, due to the freedom you have with GWT you can make that lightweight, semantically correct (tableless!) interface you want with the power of Java behind it. And you can probably get rid of some of the bloat before deploying your app.

All-in-all, GWT is really powerful and I think it will be a game changer. Next semester, another grad class I’m taking will be using it and I can’t wait to really get under the hood now that I have an understanding of how things work.

Leave a Reply

Your email address will not be published. Required fields are marked *