Making GWT and Dart work together? What are the benefits? [closed] Making GWT and Dart work together? What are the benefits? [closed] dart dart

Making GWT and Dart work together? What are the benefits? [closed]


This video and blog post (which I'm guessing is the one you mention in your question) from Shannon Behrens discusses using GWT and Dart.

  1. The following topics are covered in the video, which answers the first point in your questions.

    • Using GWT and Dart to manage different parts of the same page
    • Using Dart to retrieve JSON from a Java servlet
    • Using window.postMessage and JSNI to pass messages between GWT and Dart
    • Using JavaScript, JSNI, and Dart's js package for synchronous interoperability between GWT and Dart
    • Using CustomEvent objects and Elemental to pass messages between GWT and Dart
  2. With regards to the second question, Dart uses the same underlying AJAX APIS as JavaScript, for example, JavaScripts XMLHttpRequest is HttpRequest in Dart. Using this, you can GET / POST etc... from restful APIs.

  3. The third question "Is it possible that Dart server side (bytecodes) to Run within the JVM": Dart doesn't have bytecode. Dart on the server-side is like node.js (server-side javascript), python, ruby etc... rather than being compiled into a form of bytecode like Java. There was an early experiment to take Dart code and make it run on the JVM, but that was more an early proof of concept rather than anything for real use (ref: https://code.google.com/p/jdart/ )


  1. GWT cannot be supplanted by Dart in years to come . Dart is still in MileStone 4. Google approach to web w.r.t GWT, DART, Closure etc is summarized here.

  2. I do not see any benefits of Dart when compared to GWT w.r.t to JSON . It can be argued but never settled in either side.

  3. Dart might have the GAE support in already - http://news.dartlang.org/2013/03/irrduino-sprinkler-system-built-using.html

NOTE:I have written only few hello world programs in Dart. As of today , Dart is in Milestone 4 release

  1. Dart only runs in Customized Chrome ( Dartium Browser). Firefox, IE might never support it natively and currently hostile to it!!!! Dart compiles to Javascript (Dart2JS compiler) in the same way GWT compiles java to javascript. This allows it to provide a compatibility with IE, Firefox.

  2. Unless Dart gets supported by FireFox or turns out 10x or 100x performance w.r.t javascript it is not likely to get traction with other browsers. It currently is around 2x or 3x performance w.r.t javascript when run natively in dartium browser.