Thanks for all the great Dart questions today at Rich Web Experience! Slides are available at www.dartlang.org/slides/. See the Nov 16 Devoxx presentation as that’s the deck I ran today with just title page tweaks and more demos. I completely forgot to demo frog tip, which allows you to write Dart code that interacts with the DOM right in the browser tab. It’s under dart/frog/tip in the Dart source repo if you want to check it out. See the Getting Started wiki page to check out the source and build.
Archive for November, 2011
HTML5 and Dart @ Rich Web Experience
Posted by David Chandler on November 30, 2011
Posted in Dart | 2 Comments »
HTML5 and GWT @ Rich Web Experience
Posted by David Chandler on November 30, 2011
Here are the slides from my HTML5+GWT talk at Rich Web Experience:
Building Mobile and Enterprise Apps with HTML5 and GWT
The talk is very similar to the combined GWT and Dart talk I gave at SenchaCon last month, which you can find at www.dartlang.org/slides/.
Posted in Google Web Toolkit | 5 Comments »
Google Plugin for Eclipse now open source
Posted by David Chandler on November 16, 2011
This is pretty big news for the GWT community and should make it easier for GWT frameworks to build tooling for Eclipse. Witness JBoss, who was working on GWT integration even before the announcement. Congrats to the GPE team!
Posted in Eclipse, Google Web Toolkit | Leave a Comment »
Dart-to-JS compilation with Frog
Posted by David Chandler on November 2, 2011
I’ve been playing a bit with frog, the new Dart compiler written in Dart. Although it does not yet have all the capabilities of dartc, I’m seeing very nice improvements in compilation speed and the size of the resulting JS. Here’s some data for the sunflower and spirodraw samples:
Sunflower:
- dartc: 109,612 bytes
- frog: 12,131 bytes
Spirodraw:
- dartc: 121,799 bytes
- frog: 24,320 bytes
The dartc results were obtained by running “dartc –optimize sample.dart”. The unoptimized JS is much larger.
Frog optimizes by default. I had previously built dart on my Mac as per the wiki and installed node.js per the frog README. From there, I ran:
> cd dart > ./tools/build.py --arch=ia32 -m release > cd frog > mkdir bin > ln -s ~/code/bleeding_edge/dart/xcodebuild/Release_ia32/dart_bin bin/dart_bin > ./frog.py --js_out=frogsh -- frog.dart > export PATH=$PATH:$PWD
Then I compiled the sunflower sample with frog:
> cd ../client/samples/sunflower > frogsh --compile-only --out=sunflower.js Sunflower.dart
Because the samples are designed to be compiled with htmlconverter.py, I also had to modify the script tag in sunflower.html to reference sunflower.js instead of Sunflower.dart (and removed type=”application/dart”).
Frog runs about 10x faster than dartc –optimize on the command line! This is comparable to dartc performance in the editor, which has the advantage of a warm JVM (frog, on the other hand, runs in the Dart VM). The dramatic difference in code size is likely because dartc had not yet implemented dead code elimination. And, unlike dartc, frog does not support incremental compilation so was able to take an entirely different approach. Also, frog is not finished, so there may be gotchas that appears as more corner cases are implemented. But for the moment, it looks very promising.
Posted in Dart | 2 Comments »