Dec. 8, 2006, 4:44 p.m.

If Only Somebody Would Come Up with a Web Toolkit...

You know what we need? Some sort of toolkit that makes all this web programming stuff easier. OK, I was being facetious. What I really need is someone to come up with some sort of toolkit that helps me narrow down my toolkit selection to just two or three.

When I'm making content-centric sites, I like to use Django. It's great. Look, I'm using it now! Sometimes I have to do something in java, though, or I'm doing something more intense than just content in and out.

Historically, my java sites have used struts and its corresponding tiles to help me deal with filling my web framework needs (i.e. not writing stuff in jsp). They've sort of fallen out of fashion, and are sometimes more work than they're worth. Lately, I've been doing more manual ajaxy stuff with simple REST backend APIs. That is, I've been writing my UIs in javascript.

Moving forward, I've looked at a few frameworks that I can spend less time in. Struts is waning because JSF came along. JSF makes me feel like people found areas in development where XML was not used and managed to shove some more in there. If I'm working on a java-based application, I'd like to write my application in java. When I want to start writing my apps in XML, it's good to know there will always be plenty of options for me.

At work, we started using Google's WebToolkit (henceforth known as GWT). GWT is a fascinating framework, in that you just write java and they have this magic dev system that compiles it to javascript for you. The end result is that you basically write desktop apps and they magically become web apps.

GWT Table Widget The image to the right represents probably two hours of my work with GWT. Ignore the poor design elements (it's all CSS controlled for that) and be amazed at what it actually does. It's a table that has columns you can turn on and off, and has live data coming into it and highlighting changing cells briefly as new data arrive. 100% java, and not really all that much. I was asked to do this for our UI guy who's on PTO, but the ease at which I got that far was just amazing. Definitely good stuff.

I sort of modeled it after the cocoa stuff I've used before in that I created a TableDataSource interface that contained two methods: int numRows() and Object dataAtRowColumn(int row, int column). The table itself tracks when cells are different and does all the neat magic. So easy.

However, there is a downside to all this magic. The java that you can use here is actually somewhat limited. Essentially, you get less java on the client side than you with J2ME. Consider the JRE Emulation Library documentation. No generics, no annotations, no Thread.sleep... It's pretty small. Also, the developer tools, as cool as they are, are platform-specific. You can get it for Windows, Mac OS, and Linux, but creating a working cross-platform build and test system takes additional effort. You also have the bookmarkable URL problem...I don't even want to get into that one.

In a refreshing new turn, a friend pointed out wicket a couple of days ago. This looks like it might actually be a good fit for a couple of my projects. It doesn't have all of the stuff that's really nice about GWT (i.e. the dev system), but it's got a lot of things that are unpleasant about GWT in return. Most of the toolkits out there feel roughly similar. You have to get into RIFE or Seaside before you see anyone even trying. Of course, I don't think this is quite as different as those two, but so far, this one feels like it's going to do good things for me.

I still have no first-hand experience with it, but I do believe I'm going to try it out in one of my projects RSN.

blog comments powered by Disqus