45

I'm trying to understand which of the two to use, having four main criteria

  • Writer better, maintainable client JavaScript code, with ease of modern IDE (better content assist, better debugging)
  • Cross Browser
  • Less lock-in, can read the code
  • Technology that is more likely to be supported in the future (hardest to tell)

What are the main differences between the two technologies?

Both seem to have similar use cases, and the same potential developer community

Does it look like GWT is going to be eventually replaced by Dart? Any signes suggesting this?

Or am I missing something and they are entirely different concepts?

Eran Medan
  • 44,555
  • 61
  • 184
  • 276

4 Answers4

30

I think I found it: (should have read Dart's FAQ first, instead of googling "GWT vs Dart")

From: http://www.dartlang.org/support/faq.html#future-for-GWT

Q. What's the future for GWT?

Bruce Johnson posted on the GWT blog (with further comments on Plus): "Dart and GWT both share the goal of enabling structured web programming. In fact, many of the same engineers who brought you GWT are working on Dart. We view Dart as an ambitious evolution of GWT's mission to make web apps better for end users, and we're optimistic about its potential. As Dart evolves and becomes ready for prime time, we anticipate working closely with the GWT developer community to explore Dart."

"Meanwhile, rest assured that GWT will continue to be a productive and reliable way to build the most ambitious web apps—and even games like Angry Birds. Key projects within Google rely on GWT every day, and we plan to continue improving (and open-sourcing) GWT based on their real-world needs."

Eran Medan
  • 44,555
  • 61
  • 184
  • 276
22

I think the primary objective of Dart is not to replace source compilers to JavaScript like GWT, but to replace JavaScript itself. It needs to do that for huge maintainable code bases, and for better performance, and a bunch of other reasons I guess.

It is more strongly typed, and has borrowed many concepts from Java and other languages.

As far as predicting the future is concerned, you may be able to see how Dart is doing against JavaScript on Google Trends.

Anurag
  • 140,337
  • 36
  • 221
  • 257
11

Dart mainly exists to solve two problems

  1. Provide a client side language that enables developers to construct large applications without the pains typically associated with large javascript applications.
  2. Use the same language client and server side (i.e. the Dart SDK will eventually be similar to NodeJS).

In this way it solves the some of the same problem as GWT (bridging the gap between the client and the server) and some of the problems solved by CoffeeScript (a modern language suitable for large scale development).

Dart will hopefully do a better job at bridging the client/server gap than GWT as it was engineered from the start to be compiled to JavaScript thus solving the main problem with GWT-RPC (i.e. GWT-RPC can only serialize a tiny subset of Java, Dart does not have this problem).

Whether it will be better than CoffeScript is a different discussion, but already now its improved debugging capabilities (i.e. running it directly inside Chrome) is proving a big plus for large scale web application development (like GWT does with its dev mode).

Lars Tackmann
  • 20,275
  • 13
  • 66
  • 83
  • 1
    "GWT-RPC can only serialize a tiny subset of Java, Dart does not have this problem" - except that Java doesn't have a significant problem Dart has: a limited set of futures that can run in a browser. The only things GWT RPC doesn't serialize are things that can't be executed in the context of a client web app... – rodrigo-silveira Nov 14 '13 at 22:07
8

Dart will hopefully do a better job at bridging the client/server gap than GWT as it was engineered from the start to be compiled to JavaScript thus solving the main problem with GWT-RPC (i.e. GWT-RPC can only serialize a tiny subset of Java, Dart does not have this problem).

Never seen or encountered this problem. You can serialize with ease all types and most of the data structures in java.util.*. What more do you want or need.

Wendel
  • 81
  • 1
  • 1