Google Web Toolkit (GWT)

Tried out Google Web Toolkit (GWT). Sharing some thoughts and also my eclipse project. I went through an example to try out GWT. The GWT website GWT has some very good documentation. I went through the stock watcher example and built it step by step myself. Made a few changes on the way, such as putting the whole thing in a TabPanel.

I believe Java UI frameworks, that produce web code (html), are a great alternative to DIY HTML/Javascript libraries. Everytime I look at AJAX web frameworks and libraries, I think many of us are missing the point. Focus on building the application and not tinker with so many frameworks. I think frameworks like GWT will provide a strong alternative in the years to come. Toolset (IDE) support will make or break these frameworks.

After implementing the example, I was amazed at the ease with which I could implement AJAX functionality. In this case the UI periodically polls the backend for stock price changes and updates the section of the page. The code was…

The refreshWatchList is shown below

Its so obvious what the above code does. Well almost obvious. There are some GWT specific weird stuff you need to do, but thats a small price to pay. Here is an image of the output screen…

The price and change columns periodically update themselves (without refreshing the whole page of course). Here is my complete Eclipse project if you want to try it out – StockWatcher