Chiron
Chiron

Reputation: 20245

What is the current state of GWT development?

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

Answers (1)

Wesley
Wesley

Reputation: 10852

Let's address your three main complaints one-by-one.

Slow compilation

This is really a lot better now in a number of ways.

  • Compilation has become faster.
  • The GWT compiler can compile several permutations in parallel.
  • The (god awful) "hosted mode" browser has been replaced with a "development mode" browser plugin so that you can test in your favourite mainstream browser without compilation.

UI building

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.

Unit testing

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

Related Questions