I am a long time Java web developer and as most web developers I have used quite a lot of JavaScript. Even though I don't hate JavaScript as many other Java developers, I am still aware of its faults.
GWT is a way to write javascript using java. Since I know both languages for a long time I am pretty skeptical about this claim. I mean, I having a hard time believing that you can really create full Java dynamic web applications with a rich GUI using just GWT. That is why I am asking here if anyone had the chance to work with GWT on a large scale project. If so, I would really like to hear what they think of it.
I've written fairly large sized app in GWT, and i have to say that i'm even more impressed by GWT than i was when the project started. My general 'feel' of the platform is that things are really well thought out, and they don't do things unless they can do it well, and can do it well on all browsers (IE users are still your users!)
Now, keep in mind that what GWT really excels at is the creation of large, highly dynamic single-page style webapps. If your goal is to enhance an otherwise static page with some javascript effects, than GWT is massive overkill (gquery may change this, but i don't have experience with gquery)
Some features I enjoy include:
If you have familiarity with both JavaScript and Java, you really are perfectly suited to get the most out of GWT. What many people do not realize is that GWT is pretty well layered and that you can really decide which of those levels you want to work at.
For instance, I sometimes write directly against the DOM library for projects. Thats a lot like writing JavaScript code except you're able to use an IDE properly and get the power of a compiler. From the compiler I get static type checking, lots of good compiler optimizations, and (actually my favorite for maintaining code) debug mode assertions. Nobody ever really makes much of the ability to do assertions, but it's so nice to be able to compile a debug mode that does expensive checks to tease out bugs and then turn off the debug mode and have the code just evaporate. (Not just the assert statements go away, but all the code reachable from the asserts also gets compiled out).
Other times, I write code against GWT's UI library. That code looks a bit like swing or SWT code so it is most comfortable to pure java developers. Working at this level, you don't have to worry as much about the DOM and it is usually possible to construct an application without writing any JavaScript. You do occasionally run into a bug where something doesn't work consistently on a particular browser. The GWT folks consider those bugs.
You can kind of pick what level of abstraction you want to work at. There are tradeoffs at each level, but GWT should support them.
Also, full disclosure: I'm the dude in the video that Chi linked above, so you might say I'm pretty attached to GWT.
As with any tool, it needs to be used properly. One can wield a hammer skillfully and build something nice, or just wave it around at stuff and do more harm than good.
Google Wave, I think, has become the prototype of "what's possible" with GWT.
It's still rather hard to find good GWT design patterns because the technology is too new, so that can harm efforts to develop a very rich, large-scale web app in GWT. Before beginning such a project, I would recommend looking at examples of the model-view-presenter (MVP) pattern and be sure to use it, or something like it, as a foundation for the control flow of your web app. One nice thing about GWT, and writing your code in Java, is that the high degree of abstraction and decoupling necessary for a clean MVP implementation is pretty easy (thanks to the compiler).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With