-
Get a monthly update on best practices for delivering successful software.
Now that I'm getting immersed in the conference circuit, I've got a new game to play every time I attend a session on any technology meant to ease the pain of client-side development. Based on the session abstract, I lay odds as to how long it'll take me to hear the presenter say something like this:
Without [insert name of tool here], you'll have to write your own JavaScript. I don't know about you, but I sure don't wanna do that!
I wasn't surprised when I experienced this several times at Adobe MAX a few months ago, but it sure bummed me out to hear David Geary say it this weekend at No Fluff Just Stuff. I guess I shouldn't be surprised that this message would play well to the Java-centric crowd at NFJS. In fact, I should probably give Geary props for getting almost 75 minutes into his three-hour talk on Google Web Toolkit before delivering the blow.
My colleague Dietrich Kappe has obviously been a leading proponent of GWT, but until Geary's talk I hadn't really gotten past the high-level view. I have to say, despite the fact that GWT is designed to obviate the need for traditional client-side development, Geary's talk got me excited enough to give it a shot. At most every job I've ever had, I've wanted the chance to expand my skill set by stepping into a junior Java role on at least one project. It's never happened, though; once you're good at one thing, it's pretty hard to convince your boss to let you flail around trying to learn another on company time. Perhaps a GWT project or two will finally give me some real Java exposure in the client-side environment I know so well. It's pretty ironic, though, to write code in a language you don't understand just to have it compile "down" to a language you do.
JavaScript authors, have any of you given GWT a shot? I'd be interested to know what you learned, so leave me some comments.
Related posts:
Topics: Ajax Frameworks, GWT, Javascript
I had been an intial skeptic of compiling Java to JavaScript. However, as I read more it sounded like GWT would be a good option for getting Java developers immediately productive on UI projects.
In practice, though, I think GWT falls pretty short of that goal.
Like most RPC-over-HTTP frameworks, GWT eschews HTTP in favor of its tightly coupled one-off Java serialization tunneled through POST requests. Becuase it only supports a sub-set of Java 1.4 (lang, util, collections, etc.) on the client, we’ve had to replace our old XML/JSON serialization with GWT-compatible wrappers to our public domain objects, a task I was hoping to avoid. On the plus side, the RPC seems to be very fast and it’s nice to work in domain objects on the client.
Like its reomting infrastructure, its UI framework and widgets seem to disregard all of the work that’s been done over the last 15 years. It gives the impression that the DOM, HTML, and CSS are things to be avoided and completely encapsulated in (ultimately leaky) higher-level interfaces. Its cross-platform solution to complex layouts: nested tables. I still can’t figure out how to use its DOM API (curiously implemented as static methods on the DOM class) to set an element’s ID attribute/property. What about a CSS selector API? Or even something as simple as element.hasClassName?
The built-in widgets aren’t nearly as well thought-out or complete as Ext, Dojo, Moo Tools, etc. and to do anything beyond trivial widget compsoition, you’ll have to get your hands dirty with—you guessed it—CSS, HTML, and the DOM.
Overall, it might be good tool for rough prototypes or quick and dirty apps, but I’m not convinced of its utility beyond that.
I’d be very interested in hear opposing views. Have I missed something fundamental with GWT?
Comment by Justin Makeig, Tuesday, November 20, 2007 @ 11:20 am
I can’t speak as a developer, but am helping to organize a GWT conference that Pearson will soon host in San Fran, and we’ve made available some GWT learning materials in advance of the show:
– GWT co-creators, Bruce Johnson and Joel Webber, did podcast interviews with a Pearson exec editor and provide some interesting tidbits about the GWT development process
– we assembled a free 300-page eBook that covers topics including GWT Apps, Ajax Security, Scripting in Java and the Eclipse Web Tools Platform. Both of these items are available on the conference home page http://www.voicesthatmatter.com/gwt2007/.
(GWT eBook requires an email address).
Comment by Heather Fox, Tuesday, November 20, 2007 @ 2:04 pm