And So It Begins
There was a ton of JavaScript news around this year's JavaOne. First was Greg Murray's JMaki, a library that allows JSP and JSF developers to easily add scripted components (e.g.: Dojo widgets) to their pages with minimal effort.
Next was the less lauded, but arguably more important, Phobos. Think of it as an app-server for JavaScript. These apps can take advantage of the huge number of available Java APIs for doing most anything under the sun. FWIW, Jot takes much the same tack, but fixes the database layer impedance mismatch with a wonderful abstraction. Instead of imposing the amazingly painful "build, deploy, test" process that Java tools try to hide (and usually fail at miserably), both Phobos and Jot acknowledge that the future belongs to dynamic languages. You might still hear lots of FUD out of the static languages camp about how interpreted and/or late-binding languages are tremendously slow, but the truth is usually that your language choice probably isn't the bottleneck.
It's usually bad algorithm choice or an inability to move things that are actually slow to a faster path. I think this is part of why my love affair with Python hasn't ended despite the proverbial writing having been on the wall for a long time. I mainly blame the craptastic XML-SIG, earlier versions of Zope, and Guido's weird malaise about web development for this, but that's another sad story for another day. In Python, you don't worry about language speed. You develop fast and then when you need to optimize, you profile. If things really aren't tractable (which is rare), you just move those critical sections to C. This is a common theme across most modern scripting languages. In Java, you can still get to C via JNI, but it's a second class citizen. Perhaps it's all the "pure java" marketing BS. Perhaps it's how difficult JNI makes it to get across the border and back. Who knows, but Java has certainly suffered as a result.
Phobos is starting to fix this by acknowledge that instead of making the Java mistake (again) and attempting to boil the ocean in yet another new language, we should be riding on the investment in libraries that are already available and make it possible for application authors to work at a faster, higher level and drop down to "the metal" where it makes sense. Obviously Phobos won't solve all of Java's myriad problems, but it will at least allow the Java platform to compete on developer productivity. The tools haven't saved us, and I doubt they ever will. Time to look up the stack. Kudos to Sun for having the foresight to free developers from the shackles of expressive mediocrity that Java has imposed for so long.
Which brings me to GWT. I got asked about this at the smackdown panel and of course I hadn't had nearly enough time to dig into GWT to form a coherent answer. I'm not sure that just looking at the code and playing with the demos has given me enough depth to give a useful answer either. From where I sit, GWT looks like the physical manifestation of hiring managers' frustration when trying to hire for "ajax developer" or "UI engineer" positions. The truth of the matter is that there just aren't very many of us in the world and interestingly, Google employs a fair number of them. That they did GWT smacks of recruiting desperation and the need to better leverage the Google SSFPU (super-smart fungible programming unit).
Turns out you can't just drop a good hacker into UI programming and trust that it'll work out. Not only does someone in the UI engineering role need to have a solid appreciation for the constraints of the web, they need to be multi-language clued, know when to defer to visual designers, have the balls to push back on stupid requirements, and empathize with users. And that's the baseline. No wonder Ajax is sexy and hard to hire for. The great apps in the Ajax word are developed by great engineers and designers.
Not coincidentally, great engineers and designers value great tools. Great tools allow them to express themselves better, faster, and with less effort. This is why the smartest hackers I know want either a fully dynamic language or C. Everything else (yes, you Java and C#) are bad compromises to these folks. They raise the average by enforcing mediocrity. This is a Good Thing (TM) on average but a truly awful thing for people who need to move faster than the herd. Traversing the stack with ease, closure to slab allocator, is what defines great hackers. A high-profile investor and former hacker has written broadly on the subject, so I won't try to rehash his observations. What I do find interesting though is that folks who think they want great hackers are shocked by how bloody honest they are when they finally land one. These people call bullshit because they're constitutionally unable to stomach dumb. Before I moved to the valley, I thought that the shorter average tenure of people at tech companies here was the result of competition, but the more time I spend here the more I realize that for the best-of-the-best, it likely has more to do with the impossibility of moving Mt. Stupid than with competitors offering a better package or employers folding up shop.
So what does that have to do with GWT? Well, I think that like Java and C#, it's going to raise the average. This is also a Good Thing (TM). I'll go out on a limb and say that it's a safe bet that Bob, Cal, and Andy won't be picking it up any time soon. If they do, it'll probably be to build tools for other people. Oddly that might even be a sign that it will succeed in a broader market.
The obvious next question is "what does that mean for Dojo?".
After mulling it over for a couple of days, I think that it will boil down to "coopetition". At a minimum we'll probably see Dojo widgets integrated into GWT as an external project. Lord knows our licensing makes that a no-brainer. Beyond that, there are a lot of places where it's a "battle of paradigms". We think that markup is the fastest way to declare initial UI state but not a very good way to express logic. GWT takes the tack that it's easier for most programmers to declare UI layout in Java since they don't have to learn another language. We think that JavaScript is a better language and that it would be better of people learned more, not less, of it. GWT clearly doesn't agree. We think that imposing a compile cycle on webapp development is one of the worst things you can do for productivity. GWT seems to make the argument that library breadth makes this moot.
At the end of the day, both approaches are trying to get to a better level of productivity for building more responsive apps, and that can only be good for everyone.
Update: just saw that the Ajaxians have been thinking about GWT as well.