Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the current state of GWT development?

Tags:

java

gwt

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).

like image 503
Chiron Avatar asked Nov 25 '10 23:11

Chiron


People also ask

Does GWT have a future?

We have a medium size project based on GWT in our company; It's a mature software, with more than 100,000 users and has performed well so far. However, GWT technology seems to become obsolete and I personally see no bright future for it, in competition with brand-new client-side rivals such as Angular.

Is GWT still active?

GWT is not dead! It's simply suffering from PR misunderstanding. People think that you have to use the old widget system to use GWT, but you don't. Just use Elemento instead of widgets and REST calls instead of RPC.

Is GWT popular?

GWT (Google Web Toolkit)It is more popular than native JSF as it makes it easy to maintain complex JavaScript user interfaces with Java code.


Video Answer


1 Answers

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.

like image 134
Wesley Avatar answered Sep 19 '22 10:09

Wesley