Reputation: 20245
I did a GWT project in the past (GWT version 1.4) and it was extremely painful.
Interface is build with code (which it is really bad), requires a lot of slow compiling and waiting, unit testing was awful. Not to mention that integrating with Hibernate was the most annoying thing.
But it looks to me that GWT is really hot among Java developers and I'm reconsidering it.
Have you tried GWT 2.x? is it better now? I'm particularly interested in the three previous points (slow compiling, UI building and unit testing).
Upvotes: 8
Views: 377
Reputation: 10852
Let's address your three main complaints one-by-one.
This is really a lot better now in a number of ways.
Yes. UiBinder.
Write HTML "templates" that include elements that act as placeholders for widgets. Elements representing panels (widgets that can contain widgets) can contain elements representing other widgets.
Yes, there will still be some aspect of composing widgets in Java, but this is now greatly reduced.
How was it awful before? Your logic code can still be run through JUnit. Recently, there has been a much heavier push toward MVP design in GWT, so presumably much more of your code can be tested with plain old JUnit.
GWT also has a manner of unit testing where a non-interactive browser is run. In my experience this can usually be safely avoided when using plenty of JUnit tests both for client (presenter) and server code.
Upvotes: 13