GWT First Thoughts
December 3rd, 2007
With a sick child at home, I had some time this afternoon to play with Google Web Toolkit (GWT). Learning GWT has been on my “technologies to investigate” list for far too long; today I finally dove in. First impressions:
- GWT is quite a bit simpler than I thought it would be. I guess all that procrastination was for nothing.
- Having two monitors really helps the learning process. There are a huge number of getting started articles and tutorials, so having a web browser open on one display to read examples while coding in an IDE on another display is almost essential.
- Just dive in and start coding. I’ve attended GWT presentations, watched online videos, read (some) docs…but nothing compares to writing code.
- One of the first things I created was a TabPanel. I was someone surprised by the complete lack of a default style. Until you start messing with CSS, it looks nothing like a tabbed pane. I got completely sidetracked hacking CSS, which took vastly more time than writing the Java code to create the tabbed pane in the first place!
- It seems like there is an opportunity for talented CSS designers to put together GWT Theme Packs, consisting of ready-to-use CSS and images that give your GWT app a particular look.
- The biggest surprise (for me) was the fact that GWT still uses Java 1.4 syntax. I guess I just assumed it would be Java 5 based on experience with other Google Java APIs.
- Other than the CSS, writing a GWT app feels nothing like writing a web app. (this is a very, very good thing…)
- They’ve done a great job providing a usable development environment out of the box. Far too many other tools leave IDE and app server configuration completely up to the developer. Thus, when starting with most technologies, you spend a great deal of time tracking down JAR files, configuring Tomcat, coming up with a custom development “flow” to compile, deploy, bounce Tomcat, etc. GWT comes with tools to setup the initial project, hot deploy, and test.
- A bit more on the previous bullet…they’ve also managed to do that without locking you into a particular IDE like Eclipse or NetBeans. I find it disturbing when vendors try to lock me in to a particular IDE by writing tutorials and plugins that assume I only use one specific IDE and app server combination. So far, GWT works great in IDEA. I’m sure I could easily switch to Eclipse and everything would work there as well.
- I plan to continue this journey.
You’re absolutely correct about the lack of styling in the default GWT widgets. Take a look at the MyGWT project (http://mygwt.net). It provides a great looking set of widgets out of the box. This will probably save you a bunch of time hacking CSS files.
Java 5 support is coming in the next GWT release (1.5).
Because the standard GWT L&F is so ugly I didn’t took a closer look, especially with good looking alternatives. I didn’t know MyGWT before, but this extension is looks very nice. So I wait for Java 5 to give (My)GWT a new try.
MyGWT looks really nice, but it’s not really what I’m looking for at this point. I’m kind of hoping to find some plain old CSS to apply to the out-of-the-box GWT components, rather than a whole library of custom components.
I believe default styles are on the board for the next release. http://code.google.com/p/google-web-toolkit/issues/detail?id=1607