Sharing GWT and Dart? What are the benefits?

I recently learned about the integration of Dart and GWT, (BTW, I'm a GWT developer), although I did not have time to watch the video, I was interested to learn how to check it using my GWT application; right now I'm watching how to get Dart working on my GWT client code first.

Questions:

  • When you do Dart + GWT, which parts of the application can you use to collaborate?
  • On the client side, can GWT and Dart work together for both compiled in Javascript? Regarding this part, is Dart Browser access compatible with Restful interfaces in terms of code maintenance?
  • Is it possible that the Dart server side (bytecodes) to run in the JVM? Or will it be very slow?
+4
source share
2 answers

This video and blog post (which I assume is the one you mention in your question) from Shannon Behrens discusses the use of GWT and Dart.

  • The following topics are covered in the video that answer the first question 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 send messages between GWT and Dart
    • Using JavaScript, JSNI, and Dart js for synchronous compatibility between GWT and Dart
    • Using CustomEvent and Elemental to Transfer Messages Between GWT and Dart
  • Regarding the second question, Dart uses the same basic AJAX APIS as JavaScript, for example, JavaScripts XMLHttpRequest is HttpRequest in Dart. Using this, you can get / post etc. From the residual API.

  • Third question: "Is it possible that the Dart server side (bytecodes) to run in the JVM": Dart does not have a bytecode. A server-side dart is similar to node.js (server-side javascript), python, ruby, etc., but not compiled into bytecode form such as Java. There was an early experiment to take the Dart code and run it on the JVM, but it was more an early proof of concept than anything for real use (ref: https://code.google.com/p/jdart/ )

+6
source

Note: I wrote just a few good world programs in Darth. To date, Dart is in the release of Milestone 4

  • Dart only works in custom Chrome (Dartium Browser). Firefox, IE may never support it natively and is currently hostile to it !!!! Dart compiles in Javascript (Dart2JS compiler) in the same way that GWT compiles java into javascript. This allows for compatibility with IE, Firefox.

  • If the Dart is not supported by FireFox or the 10x or 100x wrt javascript performance fails, it is unlikely to get hooked with other browsers. It currently has about 2x or 3x wrt javascript performance when launched from the dartium browser.

+1
source

All Articles