<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Dartosphere</title>
	<link>http://www.dartosphere.org/</link>
	<language>en</language>
	<description>The Dartosphere - http://www.dartosphere.org/</description>
	

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/dartosphere" /><feedburner:info uri="dartosphere" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
	<title>Chris Strom: Rethinking DOM Menus in Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-581197352358126527.post-3394149609980599189</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/VXlu4VbdTrM/tbd.html</link>
	<description>&lt;a href="http://japhr.blogspot.com/2013/05/minor-refactoring-under-test-in-dart.html"&gt;‹prev&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2012/07/gaming-javascript-for-girls-and-boys.html"&gt;My Chain&lt;/a&gt; | &lt;span style="color: #ccc;"&gt;next›&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My house is a mess and I am not quite sure how to fix it. The house in this case is one of the classes in the &lt;a href="http://dartlang.org"&gt;Dart&lt;/a&gt; version of the &lt;a href="https://github.com/eee-c/ice-code-editor"&gt;ICE Code Editor&lt;/a&gt;. This is not a Dart problem—I had the same situation in the &lt;a href="https://github.com/eee-c/code-editor"&gt;JavaScript version&lt;/a&gt;. But the problem is more obvious in Dart.&lt;br /&gt;&lt;br /&gt;Much of the effort of late in ICE has gone into the full-screen, lite-IDE that is used in &lt;a href="http://gamingJS.com"&gt;3D Game Programming for Kids&lt;/a&gt;. The class, &lt;code&gt;Full&lt;/code&gt; starts off well enough:&lt;pre class="prettyprint"&gt;class Full {&lt;br /&gt;  Full() { /* ... */ }&lt;br /&gt;  Future get editorReady =&amp;gt; _ice.editorReady;&lt;br /&gt;  String get content =&amp;gt; _ice.content;&lt;br /&gt;  void set content(data) =&amp;gt; _ice.content = data;&lt;br /&gt;  // ...&lt;br /&gt;}&lt;/pre&gt;(the &lt;code&gt;Full()&lt;/code&gt; method is the constructor)&lt;br /&gt;&lt;br /&gt;As we have been building out the various menus and dialogs that go into an IDE, things have gone a little wrong. The menus and dialogs are clearly private methods—no external class should ever need to open the full-screen share dialog. Since Dart has first-class support for private methods, I have been dutifully marking these methods as private. It turns out that there are a lot of them:&lt;pre class="prettyprint"&gt;class Full {&lt;br /&gt;  // ...&lt;br /&gt;  _attachToolbar() { /* ... */ }&lt;br /&gt;  _attachMainMenuButton(parent) { /* ... */ }&lt;br /&gt;  _attachKeyboardHandlers() { /* ... */ }&lt;br /&gt;  _attachMouseHandlers() { /* ... */ }&lt;br /&gt;  _showMainMenu() { /* ... */ }&lt;br /&gt;  _hideMenu() { /* ... */ }&lt;br /&gt;  _hideDialog() { /* ... */ }&lt;br /&gt;&lt;br /&gt;  get _newProjectMenuItem { /* ... */ }&lt;br /&gt;  _openNewProjectDialog() { /* ... */ }&lt;br /&gt;  _saveNewProject() { /* ... */ }&lt;br /&gt;&lt;br /&gt;  get _projectsMenuItem { /* ... */ }&lt;br /&gt;  _openProjectsMenu() { /* ... */ }&lt;br /&gt;  _openProject(title) { /* ... */ }&lt;br /&gt;&lt;br /&gt;  get _saveMenuItem { /* ... */ }&lt;br /&gt;  void _save() { /* ... */ }&lt;br /&gt;&lt;br /&gt;  get _shareMenuItem { /* ... */ }&lt;br /&gt;  _openShareDialog() { /* ... */ }&lt;br /&gt;}&lt;/pre&gt;I am not quite certain how best to reduce the noise. The most obvious thing—the thing that I have been threatening since this was in JavaScript—is to move dialogs and their associated actions into self-contained classes. The biggest unknown for me is how to allow communication back into the main class. &lt;br /&gt;&lt;br /&gt;The dialog that needs the most access is the Projects dialog, whose current entry point is &lt;code&gt;_projectsMenutItem()&lt;/code&gt;. In addition to doing menu-like things, it needs to read from and write to the localStorage &lt;code&gt;Store&lt;/code&gt; class. It also needs to be able to update the code editor when switching between projects. Since that seems the hardest, I start with it.&lt;br /&gt;&lt;br /&gt;The entry point is still the menu list item that goes on the main menu. This will have to be exposed as a getter, which I call &lt;code&gt;el&lt;/code&gt;:&lt;pre class="prettyprint"&gt;class ProjectsDialog {&lt;br /&gt;  // ...&lt;br /&gt;  Element get el {&lt;br /&gt;    return new Element.html('&amp;lt;li&amp;gt;Projects&amp;lt;/li&amp;gt;')&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _hideMenu())&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _openProjectsMenu());&lt;br /&gt;  }&lt;br /&gt;  // ...&lt;br /&gt;}&lt;/pre&gt;I pull in the &lt;code&gt;_openProjectsMenu()&lt;/code&gt; method without change, along with the &lt;code&gt;_openProject()&lt;/code&gt; method. Already the cohesion of these methods is improved. To continue to work, they need access to the parent element of the &lt;code&gt;Full&lt;/code&gt; editor, as well as the editor itself and the data store. So I define a constructor that accepts all three:&lt;pre class="prettyprint"&gt;class ProjectsDialog {&lt;br /&gt;&lt;b&gt;  var parent, ice, store;&lt;br /&gt;  ProjectsDialog(this.parent, this.ice, this.store);&lt;/b&gt;&lt;br /&gt;  Element get el {&lt;br /&gt;    return new Element.html('&amp;lt;li&amp;gt;Projects&amp;lt;/li&amp;gt;')&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _hideMenu())&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _openProjectsMenu());&lt;br /&gt;  }&lt;br /&gt;  // ...&lt;br /&gt;}&lt;/pre&gt;With that, I can return the main menu, which is still in the &lt;code&gt;Full&lt;/code&gt; class, and inject the new &lt;code&gt;ProjectsDialog&lt;/code&gt; as:&lt;pre class="prettyprint"&gt;class Full {&lt;br /&gt;  // ...&lt;br /&gt;  _showMainMenu() {&lt;br /&gt;    var menu = new Element.html('&amp;lt;ul class=ice-menu&amp;gt;');&lt;br /&gt;    el.children.add(menu);&lt;br /&gt;&lt;br /&gt;    menu.children&lt;br /&gt;&lt;b&gt;      ..add(new ProjectsDialog(el, _ice, _store).el)&lt;/b&gt;&lt;br /&gt;      ..add(_newProjectMenuItem)&lt;br /&gt;      ..add(new Element.html('&amp;lt;li&amp;gt;Rename&amp;lt;/li&amp;gt;'))&lt;br /&gt;      ..add(new Element.html('&amp;lt;li&amp;gt;Make a Copy&amp;lt;/li&amp;gt;'))&lt;br /&gt;      ..add(_saveMenuItem)&lt;br /&gt;      ..add(_shareMenuItem)&lt;br /&gt;      ..add(new Element.html('&amp;lt;li&amp;gt;Download&amp;lt;/li&amp;gt;'))&lt;br /&gt;      ..add(new Element.html('&amp;lt;li&amp;gt;Help&amp;lt;/li&amp;gt;'));&lt;br /&gt;  }&lt;br /&gt;  // ...&lt;br /&gt;}&lt;/pre&gt;And that works. All of my tests still pass. I even give it a try in the sample app and it still works. &lt;br /&gt;&lt;br /&gt;It seems a bit ugly to pass in those three parameters to the &lt;code&gt;ProjectsDialog&lt;/code&gt; constructor. If only there was something that encapsulated those three objects… like the &lt;code&gt;Full&lt;/code&gt; object that is creating them maybe?&lt;br /&gt;&lt;br /&gt;Then the menu list could start as:&lt;pre class="prettyprint"&gt;&lt;code&gt;    menu.children&lt;br /&gt;&lt;b&gt;      ..add(new ProjectsDialog(this).el)&lt;/b&gt;&lt;br /&gt;      ..add(_newProjectMenuItem)&lt;br /&gt;      ..add(new Element.html('&amp;lt;li&amp;gt;Rename&amp;lt;/li&amp;gt;'))&lt;br /&gt;      // ...&lt;/code&gt;&lt;/pre&gt;That works, but the &lt;code&gt;_ice&lt;/code&gt; and &lt;code&gt;_store&lt;/code&gt; properties can no longer be private. I am not sure that is worth the change, so I call it a night here to give the idea a chance to percolate.&lt;br /&gt;&lt;br /&gt;Regardless, I like the overall approach to extracting the menu dialogs out of the &lt;code&gt;Full&lt;/code&gt; IDE class. This approach definitely has promise. And having a strong test suite in place to guard against regressions is invaluable.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ccc;"&gt;Day #761&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/VXlu4VbdTrM" height="1" width="1"/&gt;</description>
	<pubDate>Sat, 25 May 2013 03:54:00 +0000</pubDate>
	<author>noreply@blogger.com (Chris Strom)</author>
<feedburner:origLink>http://japhr.blogspot.com/2013/05/tbd.html</feedburner:origLink></item>
<item>
	<title>Chris Strom: Minor Refactoring under Test in Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-581197352358126527.post-1667915520130472910</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/-BLLAsrHkoM/minor-refactoring-under-test-in-dart.html</link>
	<description>&lt;a href="http://japhr.blogspot.com/2013/05/driving-dart-integration-tests.html"&gt;‹prev&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2012/07/gaming-javascript-for-girls-and-boys.html"&gt;My Chain&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2013/05/tbd.html"&gt;next›&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Today, I would like to start thinking about how to consolidate some of my &lt;a href="http://dartlang.org"&gt;Dart&lt;/a&gt; code in the &lt;a href="https://github.com/eee-c/ice-code-editor"&gt;ICE Code Editor&lt;/a&gt;. I think that it is a bit early to start breaking the sub-menus and dialogs out into Dart classes. So instead, I am going to scavenge the codebase for things that are asking to be removed or consolidated.&lt;br /&gt;&lt;br /&gt;One of the first things that asks to come out are styles. I love using method cascades for CSS styles in Dart:&lt;pre class="prettyprint"&gt;&lt;code&gt;  _openNewProjectDialog() {&lt;br /&gt;    var dialog = new Element.html(&lt;br /&gt;        '''&lt;br /&gt;        &amp;lt;div class=ice-dialog&amp;gt;&lt;br /&gt;        &amp;lt;label&amp;gt;Name:&amp;lt;input type="text" size="30"&amp;gt;&amp;lt;/label&amp;gt;&lt;br /&gt;        &amp;lt;button&amp;gt;Save&amp;lt;/button&amp;gt;&lt;br /&gt;        &amp;lt;/div&amp;gt;&lt;br /&gt;        '''&lt;br /&gt;      );&lt;br /&gt;&lt;br /&gt;&lt;b&gt;    dialog.style&lt;br /&gt;      ..position = 'absolute'&lt;br /&gt;      ..margin = '2px'&lt;br /&gt;      ..right = '20px'&lt;br /&gt;      ..top = '45px'&lt;br /&gt;      ..zIndex = '999';&lt;/b&gt;&lt;br /&gt;    // ...&lt;br /&gt;  }&lt;/code&gt;&lt;/pre&gt;As much as I like a good method cascade, I am setting the same style for multiple dialogs. In fact, I am setting the same style for sub-menus as well. So, reluctantly, I pull that out into vanilla CSS:&lt;pre class="prettyprint"&gt;.ice-menu, .ice-dialog {&lt;br /&gt;  /* ... */&lt;br /&gt;  position: absolute;&lt;br /&gt;  margin: 2px;&lt;br /&gt;  right: 20px;&lt;br /&gt;  top: 45px;&lt;br /&gt;  z-index: 999;&lt;br /&gt;}&lt;/pre&gt;Sometimes there is no substitution for a low-tech solution.&lt;br /&gt;&lt;br /&gt;I clean out a few other minor things and then come across:&lt;pre class="prettyprint"&gt;&lt;code&gt;  _hideMenu() {&lt;br /&gt;    if (query('.ice-menu') == null) return;&lt;br /&gt;    query('.ice-menu').remove();&lt;br /&gt;    // queryAll('.ice-menu').forEach((e)=&amp;gt; e.remove());&lt;br /&gt;  }&lt;/code&gt;&lt;/pre&gt;I really dislike that conditional. It seems like that &lt;code&gt;queryAll()&lt;/code&gt; ought to be equivalent, if not a better solution. Instead of finding one &lt;code&gt;.ice-menu&lt;/code&gt; element, it will find them all and remove each. If there are no matching elements, which is what the current conditional is guarding, then the &lt;code&gt;forEach()&lt;/code&gt; should be a no-op.&lt;br /&gt;&lt;br /&gt;But I commented that out for a reason. Specifically, if I replace the current code with the &lt;code&gt;queryAll()&lt;/code&gt; version, I get test failures:&lt;pre class="prettyprint"&gt;FAIL: project menu lists project names&lt;br /&gt;  Expected: List of elements contains match 'My New Project'&lt;br /&gt;       but: Element list content was &amp;lt;[☰X, ☰, X, , , , , , , , , , , , , X, , , ]&amp;gt;.&lt;/pre&gt;Interestingly, I think that I was relying on coincidence to make the “list project names” feature work. In particular, the way that I opened the project list sub-menu was opening the menu first, then closing the main menu:&lt;pre class="prettyprint"&gt;&lt;code&gt;  _projectsMenuItem() {&lt;br /&gt;    return new Element.html('&amp;lt;li&amp;gt;Projects&amp;lt;/li&amp;gt;')&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _openProjectsMenu())&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _hideMenu());&lt;br /&gt;  }&lt;/code&gt;&lt;/pre&gt;This, and a bunch of other tests, pass if I hide all menus &lt;i&gt;before&lt;/i&gt; opening the project menu:&lt;pre class="prettyprint"&gt;&lt;code&gt;  _projectsMenuItem() {&lt;br /&gt;    return new Element.html('&amp;lt;li&amp;gt;Projects&amp;lt;/li&amp;gt;')&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _hideMenu())&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _openProjectsMenu());&lt;br /&gt;  }&lt;/code&gt;&lt;/pre&gt;In the end, the previous conditional-then-remove-the-first-element-in-the-DOM approach was less than robust. So this refactoring / cleanup has helped improve the strength of the codebase. Hopefully it has cleaned enough cruft so that I have a better handle on how to better approach those sub-menus and dialogs. I will get started on that tomorrow.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ccc;"&gt;Day #760&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/-BLLAsrHkoM" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 24 May 2013 03:59:00 +0000</pubDate>
	<author>noreply@blogger.com (Chris Strom)</author>
<feedburner:origLink>http://japhr.blogspot.com/2013/05/minor-refactoring-under-test-in-dart.html</feedburner:origLink></item>
<item>
	<title>Dartwatch: Win-win for developers and users: Dart @ Google I/O 2013</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8928104154571388295.post-7826832530067455921</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/schARy2HU58/welcome-document.html</link>
	<description>&lt;h1&gt;
Win-win for developers and users: Dart @ Google I/O 2013&lt;/h1&gt;
Google I/O 2013 is now over, and Dart had a pretty good showing, with three Dart talks and a codelab.  &lt;br /&gt;
Performance was a big theme throughout Google I/O, especially with Chrome and Mobile in mind.  Mobile apps running with a touch screen need to be more responsive than ever to create a good user experience (when you're physically touching a widget, you expect it to respond immediately to your touch), and there was lots of discussion about the target 60 fps refresh rate on mobile.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Win 1: Great performance for users.&lt;/h2&gt;
&lt;a href="https://developers.google.com/events/io/sessions/324431687"&gt;Lars Bak and Kasper Lund's talk on VM Performance&lt;/a&gt; highlighted some of the problems that they face when designing a VM.  They've designed VMs in the past (including Hotspot VM and Chrome's V8), and although V8 made great leaps initially (an initial benchmark in Firefox ran at "100" when V8 was being invented.  Now, the same benchmark runs at around "~16,000"), the rate of improvement is slow.  In order to get the next "leap" in performance, they need to address some of the problems with the actual language (JavaScript).  An example given in their talk is that V8 optimizes based upon known executions of a block of code up to that point.  If, however, that code changes (such as inserting a new property into the prototype), the optimizer has to back-out the optimizations until it's ready to optimize again.  All this has an overhead.  &lt;br /&gt;
&lt;br /&gt;
By designing a language that is designed to make it easy to optimize a VM for, Dart's is already ahead of V8 in terms of performance (after only about 2 years of development, compared to 7 years of V8).&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img alt="enter image description here" src="http://asset0.cbsistatic.com/cnwk.1d/i/tim2/2013/05/16/20130516_Dart_Google_IO_004_610x382.jpg" style="margin-left: auto; margin-right: auto;" title="" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Image courtesy &lt;span style="background-color: white; color: #222222; font-family: arial, sans-serif; text-align: left; white-space: nowrap;"&gt;&lt;a href="https://plus.google.com/+StephenShankland"&gt;Stephen Shankland&lt;/a&gt; / &lt;a href="https://www.google.co.uk/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;ved=0CDAQFjAA&amp;amp;url=http%3A%2F%2Fnews.cnet.com%2F8301-1023_3-57584979-93%2Fgoogle-dart-will-rescue-browsers-from-javascript%2F&amp;amp;ei=HTqeUcjXDKLg7QbKuoDYAg&amp;amp;usg=AFQjCNHQ9ojKAwV4VtEoPUx7b1lVsC3vvQ&amp;amp;sig2=jPz9avSaBpQNmXUfiNUmYw&amp;amp;bvm=bv.46865395,d.ZGU"&gt;cnet&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
There are (currently broken) &lt;a href="https://code.google.com/p/dart/wiki/Android"&gt;instructions&lt;/a&gt; on the Dart wiki about building a VM on ARM, and it has to be thought that a long-term goal must be to get the Dart VM (integrated with chrome?) running on Android.  This has twin benefits for users: better application performance, and longer battery life (as there is less work done).&lt;br /&gt;
&lt;br /&gt;
By making use of advance chip technologies, such as SIMD (Single Instruction, Multiple Data) the Dart VM is able to leverage the maximum power available.  A great demo of this was the 3d demo of monsters - only around 35 were visible with SIMD turned off in the VM (at 60fps), but when SIMD turned on, 60fps was maintained with ~120 monsters.&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img alt="enter image description here" src="http://i.i.com.com/cnwk.1d/i/tim2/2013/05/16/20130516_Dart_Google_IO_005_610x368.jpg" style="margin-left: auto; margin-right: auto;" title="" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Image courtesy &lt;span style="background-color: white; color: #222222; font-family: arial, sans-serif; text-align: left; white-space: nowrap;"&gt;&lt;a href="https://plus.google.com/+StephenShankland"&gt;Stephen Shankland&lt;/a&gt; / &lt;a href="https://www.google.co.uk/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;cad=rja&amp;amp;ved=0CDAQFjAA&amp;amp;url=http%3A%2F%2Fnews.cnet.com%2F8301-1023_3-57584979-93%2Fgoogle-dart-will-rescue-browsers-from-javascript%2F&amp;amp;ei=HTqeUcjXDKLg7QbKuoDYAg&amp;amp;usg=AFQjCNHQ9ojKAwV4VtEoPUx7b1lVsC3vvQ&amp;amp;sig2=jPz9avSaBpQNmXUfiNUmYw&amp;amp;bvm=bv.46865395,d.ZGU"&gt;cnet&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
Win 2: Great experience for developers.&lt;/h2&gt;
I also spent some time on the Dart stand in the sandbox talking to web developers about Dart, and went to the Dart codelab.  As a developer, it's awesome to be able to leverage Web Components combined with Dart's well known language features (libraries, functional, unsurprising and familiar classes, optional typing), all wrapped up with with great tools such as package management, IDE, Debugger and type checker.  Developers that I was talking to at the Dart stand seemed suitably impressed with what Dart currently had to offer (especially as many hadn't looked at it since its initial release).&lt;br /&gt;
&lt;blockquote&gt;
"It can't really be this easy?"&lt;/blockquote&gt;
In the &lt;a href="https://developers.google.com/events/io/sessions/384097044"&gt;Codelab&lt;/a&gt;, which used Web Components to build a multi-file, offline document editor, the other developers sat around me had positive views, with one even saying "It can't really be this easy? - It almost feels like cheating." - Yes, Dart really is productive.  Give the codelab a try and see for yourself.&lt;br /&gt;
&lt;br /&gt;
That quote summed up the current state of Dart for me, when I go around doing talks on Dart, and showing Dart to fellow developers, they are often surprised to see the great developer story and productivity gains.  When combined with the improved performance of apps with the Dart VM, they start to see how it can help to &lt;strong&gt;move web applications on to the next level&lt;/strong&gt;.&lt;br /&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
On JavaScript future.&lt;/h2&gt;
Because Dart also targets JavaScript, any advances made in JavaScript to allow better JavaScript optimizations will also benefit developers and users.  Developers still get the same great Dart development story, and users will benefit from increased performance of their JavaScript version of the Dart app.  Of course, browsers that contain the Dart VM will likely to continue to remain faster running native Dart than the equivalent JavaScript.&lt;br /&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
The Sessions from I/O&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/events/io/sessions/384097044"&gt;Codelab: Mobile web apps with Dart and Web Components&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.blogger.com/Today!%5Dhttps://developers.google.com/events/io/sessions/325433525"&gt;Dart: The Future of HTML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/events/io/sessions/325475052"&gt;What's new in Dart: Your First Class Upgrade to Web Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/events/io/sessions/324431687"&gt;Web Languages and VMs: Fast code is always in fashion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Images from cnet article "&lt;a href="http://news.cnet.com/8301-1023_3-57584979-93/google-dart-will-rescue-browsers-from-javascript/"&gt;Dart will rescue browsers from JavaScript&lt;/a&gt;"&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=BhtbPUiSGuA:R7AhF71sDkE:yIl2AUoC8zA"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=yIl2AUoC8zA" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=BhtbPUiSGuA:R7AhF71sDkE:V_sGLiPBpWU"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=BhtbPUiSGuA:R7AhF71sDkE:V_sGLiPBpWU" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=BhtbPUiSGuA:R7AhF71sDkE:qj6IDK7rITs"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=qj6IDK7rITs" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=BhtbPUiSGuA:R7AhF71sDkE:63t7Ie-LG7Y"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=63t7Ie-LG7Y" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=BhtbPUiSGuA:R7AhF71sDkE:F7zBnMyn0Lo"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=BhtbPUiSGuA:R7AhF71sDkE:F7zBnMyn0Lo" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img height="1" src="http://feeds.feedburner.com/~r/Dartwatch/~4/BhtbPUiSGuA" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/schARy2HU58" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 23 May 2013 15:52:09 +0000</pubDate>
	<author>noreply@blogger.com (Chris Buckett)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/Dartwatch/~3/BhtbPUiSGuA/welcome-document.html</feedburner:origLink></item>
<item>
	<title>Chris Strom: Driving Dart Integration Tests</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-581197352358126527.post-5449580620414179013</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/EADLGm3QpZU/driving-dart-integration-tests.html</link>
	<description>&lt;a href="http://japhr.blogspot.com/2013/05/custom-test-matchers-in-dart.html"&gt;‹prev&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2012/07/gaming-javascript-for-girls-and-boys.html"&gt;My Chain&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2013/05/minor-refactoring-under-test-in-dart.html"&gt;next›&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The crazy thing about driving things with tests is that stuff gets done. I have been having a good old time playing around with the test suite in the &lt;a href="http://dartlang.org"&gt;Dart&lt;/a&gt; version of the &lt;a href="https://github.com/eee-c/ice-code-editor"&gt;ICE Code Editor&lt;/a&gt;. I spent so much time fiddling with the tests that I barely noticed the progress with functionality. Mostly thanks to &lt;a href="https://www.google.com/calendar/selfsched?sstoken=UUNwdmNwR09IRm4wfGRlZmF1bHR8NmVjZjU2MGY0MzU4MTBlMjFkZTE0ZDgzYjdkMGU4ZjM"&gt;#pairwithme&lt;/a&gt; sessions, the functionality of the ICE Code Editor is really coming along.&lt;br /&gt;&lt;br /&gt;Tonight, I take a step back to see how it is working with the new test helpers that I have written over the past two nights when driving new functionality. Thanks to last night's #pairwithme session with &lt;a href="http://japhr.blogspot.com/feeds/posts/default/-/dart"&gt;Santiago Arias&lt;/a&gt;, ICE now lists the currently saved projects in the Projects menu. Tonight I would like to be able to click on old ones to make them active.&lt;br /&gt;&lt;br /&gt;I start with a long UI workflow test:&lt;pre class="prettyprint"&gt;&lt;code&gt;    test("click names to switch between projects", (){&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'New');&lt;br /&gt;&lt;br /&gt;      query('input').value = 'Project #1';&lt;br /&gt;      helpers.click('button', text: 'Save');&lt;br /&gt;&lt;br /&gt;      editor.content = 'Code #1';&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'Save');&lt;br /&gt;&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'New');&lt;br /&gt;&lt;br /&gt;      query('input').value = 'Project #2';&lt;br /&gt;      helpers.click('button', text: 'Save');&lt;br /&gt;&lt;br /&gt;      editor.content = 'Code #2';&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'Save');&lt;br /&gt;&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'Projects');&lt;br /&gt;      helpers.click('li', text: 'Project #1');&lt;br /&gt;&lt;br /&gt;      expect(&lt;br /&gt;        editor.content,&lt;br /&gt;        equals('Code #1')&lt;br /&gt;      );&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;This fully exercises the full screen ICE menus by clicking the menu button (the UTF-8 ☰ symbol), then creating a new project, setting the content and saving the project. I do that twice, at which point the content for the second project is still active. I then open the Projects menu and select the first project from the list. The expectation is that the editor content will have changed to “Code #1” the content of the first project. &lt;br /&gt;&lt;br /&gt;It is so cool that, thanks to Dart's testing facilities and some simple helpers, the test is so expressive and yet completely functional. The first time I run that test, I get a failure. The exact failure that I had hoped to get to drive this feature:&lt;pre class="prettyprint"&gt;FAIL: project menu click names to switch between projects&lt;br /&gt;  Expected: 'Code #1'&lt;br /&gt;       but: was 'Code #2'.&lt;/pre&gt;How awesome is that? &lt;br /&gt;&lt;br /&gt;Then again, maybe my UI testing expectations are just too low. Perhaps this is really how it ought to be. Regardless, this is reality in the world of Dart and I embrace it by writing the code that implements this. With that bit of smugness fully internalized, I run into all sorts of problems.&lt;br /&gt;&lt;br /&gt;The implementation is not too hard:&lt;pre class="prettyprint"&gt;&lt;code&gt;    _store.forEach((title, data) {&lt;br /&gt;      var project = new Element.html('&amp;lt;li&amp;gt;${title}&amp;lt;/li&amp;gt;')&lt;br /&gt;        ..onClick.listen((e)=&amp;gt; _openProject(title))&lt;br /&gt;        ..onClick.listen((e)=&amp;gt; _hideMenu());&lt;br /&gt;&lt;br /&gt;      menu.query('ul').children.add(project);&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;For each item in the data store, I create a menu item for the Projects menu. Each project menu item gets a couple of handlers to open the project and hide the menu. The underlying &lt;code&gt;Store&lt;/code&gt; class could support opening a project better, but that is not really the problem. &lt;br /&gt;&lt;br /&gt;The problem is that, after saving items by clicking the “Save” option from the main menu, I was not closing the main menu. It would stay up causing subsequent tests to fail because the wrong menus were now active.&lt;br /&gt;&lt;br /&gt;I could have written this test such that the localStorage store was initialized with projects in place. This would have avoided the save-not-closing-the-menu issue (though I would not have found the bug otherwise) and the subsequent implementation would likely end up exactly the same. But there is something exciting about a test that exercises the full stack in milliseconds. If I had other tests that covered similar ground, I might manually initialize the localStorage, but I really prefer to keep this around.&lt;br /&gt;&lt;br /&gt;It turns out to be quite the effort to keep it around. The test continues to fail and is compounded with a problem running these tests solo due to js-interop concerns. Thankfully, tonight's #pairwithme pair, &lt;a href="http://eval-defun.tumblr.com/"&gt;Daniel Gempesaw&lt;/a&gt;, helps me through it. &lt;br /&gt;&lt;br /&gt;We drive the problem away with another test:&lt;pre class="prettyprint"&gt;&lt;code&gt;    test("clicking save closes the main menu", (){&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text:  'Save');&lt;br /&gt;&lt;br /&gt;      expect(queryAll('li').map((e)=&amp;gt; e.text).toList(), isEmpty);&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;All that is needed to make that pass is a second on-click listener for the “Save” menu item:&lt;pre class="prettyprint"&gt;&lt;code&gt;  Element get _saveMenuItem {&lt;br /&gt;    return new Element.html('&amp;lt;li&amp;gt;Save&amp;lt;/li&amp;gt;')&lt;br /&gt;      ..onClick.listen((e)=&amp;gt; _save())&lt;br /&gt;&lt;b&gt;      ..onClick.listen((e)=&amp;gt; _hideMenu());&lt;/b&gt;&lt;br /&gt;  }&lt;/code&gt;&lt;/pre&gt;With that, not one, but two tests are passing. More importantly, it is now possible to switch between projects in the Dart version of the ICE Code Editor. Yay!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ccc;"&gt;Day #759&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/EADLGm3QpZU" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 23 May 2013 03:59:00 +0000</pubDate>
	<author>noreply@blogger.com (Chris Strom)</author>
<feedburner:origLink>http://japhr.blogspot.com/2013/05/driving-dart-integration-tests.html</feedburner:origLink></item>
<item>
	<title>Chris Strom: Custom Test Matchers in Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-581197352358126527.post-5992766970586922050</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/BvpS2unlCyg/custom-test-matchers-in-dart.html</link>
	<description>&lt;a href="http://japhr.blogspot.com/2013/05/dart-test-helpers.html"&gt;‹prev&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2012/07/gaming-javascript-for-girls-and-boys.html"&gt;My Chain&lt;/a&gt; | &lt;a href="http://japhr.blogspot.com/2013/05/driving-dart-integration-tests.html"&gt;next›&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After last night, I have helpered my way to a nice looking &lt;a href="http://dartlang.org"&gt;Dart&lt;/a&gt; test:&lt;pre class="prettyprint"&gt;&lt;code&gt;    test("clicking the project menu item opens the project dialog", (){&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'Projects');&lt;br /&gt;&lt;br /&gt;      expect(&lt;br /&gt;        queryAll('div').map((e)=&amp;gt; e.text).toList(),&lt;br /&gt;        contains(matches('Saved Projects'))&lt;br /&gt;      );&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;That's downright pretty, except… that &lt;code&gt;expect()&lt;/code&gt; is, let's face it, plain yucky.&lt;br /&gt;&lt;br /&gt;The thing that I am testing is kinda OK. It is a map of the text contents of &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements. I could do without the &lt;code&gt;map()&lt;/code&gt;, but it's not horrible. The &lt;code&gt;toList()&lt;/code&gt; is bothersome. It can be omitted, but it is useful to have around. For instance, if I cause an intentional failure by naming the menu "Saved Code" instead of "Saved Projects", I get a nice error message that gives me an idea of what went wrong:&lt;pre class="prettyprint"&gt;FAIL: project menu clicking the project menu item opens the project dialog&lt;br /&gt;  Expected: contains match '&lt;b&gt;Saved Projects&lt;/b&gt;'&lt;br /&gt;       but: was &amp;lt;[☰X&lt;br /&gt;          &lt;b&gt;Saved Code&lt;/b&gt;&lt;br /&gt;          , ☰, X, , , , , , , , , , , , , X, , , , &lt;br /&gt;          &lt;b&gt;Saved Code&lt;/b&gt;&lt;br /&gt;          ]&amp;gt;.&lt;/pre&gt;If I omit the &lt;code&gt;toList()&lt;/code&gt;, then the object that I am testing is an &lt;code&gt;Iterable&lt;/code&gt;. It still passes or fails as desired, but the failure message is less nice:&lt;pre class="prettyprint"&gt;FAIL: project menu clicking the project menu item opens the project dialog&lt;br /&gt;  Expected: contains match 'Saved Projects'&lt;br /&gt;       but: was &amp;lt;Instance of 'MappedListIterable':554001401&amp;gt;.&lt;/pre&gt;So I leave &lt;code&gt;toList()&lt;/code&gt; as a bit of test code ugliness so that I get nicer test code output. I can live with that.&lt;br /&gt;&lt;br /&gt;The expected value is not quite as nice.  Dart provides a nice matcher for lists: &lt;code&gt;contains()&lt;/code&gt;. So in this case I am expecting a list that contains something. That something is anything that matches the string &lt;code&gt;'Saved Projects'&lt;/code&gt;. It works, but it is hard to read.&lt;br /&gt;&lt;br /&gt;But hard to read matchers are what custom matchers are for. For this expectation, I may not even need to write an entirely new matcher. Instead, I start by inheriting from &lt;code&gt;CustomMatcher&lt;/code&gt;. These nifty little things set a description ("List of elements") and a feature name ("Element list content") in the constructor:&lt;pre class="prettyprint"&gt;class ElementListMatcher extends CustomMatcher {&lt;br /&gt;  ElementListMatcher(matcher) :&lt;br /&gt;      super("List of elements", "Element list content", matcher);&lt;br /&gt;&lt;br /&gt;  featureValueOf(elements) =&amp;gt; elements.map((e)=&amp;gt; e.text).toList();&lt;br /&gt;}&lt;/pre&gt;I then pick a value to extract from the actual value. If the actual value is a list of elements, then the above extracts the text contents in List form. That is just what I had to do by hand in my test, but all of the ugliness of mapping and converting from an iterable to a list is done in the custom matcher.&lt;br /&gt;&lt;br /&gt;I then create a top-level helper that uses this matcher to check the extracted/featured list to see if it contains a match:&lt;pre class="prettyprint"&gt;elements_contain(Pattern content) =&amp;gt;&lt;br /&gt;  new ElementListMatcher(contains(matches(content)));&lt;br /&gt;&lt;/pre&gt;Those are two pretty simple helpers that let me rewrite my test entirely with helpers as:&lt;pre class="prettyprint"&gt;&lt;code&gt;    test("clicking the project menu item opens the project dialog", (){&lt;br /&gt;      helpers.click('button', text: '☰');&lt;br /&gt;      helpers.click('li', text: 'Projects');&lt;br /&gt;&lt;br /&gt;      expect(&lt;br /&gt;        queryAll('div'),&lt;br /&gt;        helpers.elements_contain('Saved Projects')&lt;br /&gt;      );&lt;br /&gt;    });&lt;/code&gt;&lt;/pre&gt;That is pretty all the way through: I click a button with the menu icon, I click the "Projects" menu item, then I expect one of the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tags to contain the text "Saved Projects". Wonderful!&lt;br /&gt;&lt;br /&gt;And best of all it works!&lt;br /&gt;&lt;br /&gt;If I again intentionally make my test fail, I get:&lt;pre class="prettyprint"&gt;FAIL: project menu clicking the project menu item opens the project dialog&lt;br /&gt;  Expected: &lt;b&gt;List of elements&lt;/b&gt; contains match 'Saved Projects'&lt;br /&gt;       but: &lt;b&gt;Element list content&lt;/b&gt; was &amp;lt;[☰X&lt;br /&gt;          Saved Code&lt;br /&gt;          , ☰, X, , , , , , , , , , , , , X, , , , &lt;br /&gt;          Saved Code&lt;br /&gt;          ]&amp;gt;.&lt;/pre&gt;That is even more expressive than what I had when I manually extracted a list to test and the test content is easier to read. The use of the &lt;code&gt;helpers&lt;/code&gt; prefix from last night is the only remaining noise (and I still think it worth keeping about). All in all, these test matchers are pretty powerful.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #ccc;"&gt;Day #758&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/BvpS2unlCyg" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 22 May 2013 03:57:00 +0000</pubDate>
	<author>noreply@blogger.com (Chris Strom)</author>
<feedburner:origLink>http://japhr.blogspot.com/2013/05/custom-test-matchers-in-dart.html</feedburner:origLink></item>
<item>
	<title>Seth Ladd: Watch the video from What's New in Dart from Google I/O 2013</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8601579266012455634.post-8333912216758521700</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/zvS1-S4jf14/watch-video-from-whats-new-in-dart-from.html</link>
	<description>Google I/O was a blast, and &lt;a href="http://news.dartlang.org/2013/05/strong-dart-presence-at-2013-google-io.html"&gt;Dart had a great time&lt;/a&gt;. For posterity, check out the video of my talk with co-presenter Justin Fagnani. We covered what's new across the Dartosphere, including language features, libraries, tools, and ecosystem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Like what you see? Head on over to &lt;a href="http://dartlang.org/"&gt;dartlang.org&lt;/a&gt; to download the SDK and check out our docs and tutorials. You can always find us in our &lt;a href="http://g.co/dartisans"&gt;Dartisans G+ community&lt;/a&gt;. Stop by and say hi!&lt;img height="1" src="http://feeds.feedburner.com/~r/SethLaddsBlog/~4/dSqeqnt1TIM" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/zvS1-S4jf14" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 22 May 2013 03:41:00 +0000</pubDate>
	<author>noreply@blogger.com (Seth Ladd)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/SethLaddsBlog/~3/dSqeqnt1TIM/watch-video-from-whats-new-in-dart-from.html</feedburner:origLink></item>
<item>
	<title>Dartlang: Dart Sessions at Google I/O 2013</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-1636601191077561071.post-492086960517591176</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/WlujdFDAot4/strong-dart-presence-at-google-io-2013.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;Join us at Google I/O 2013 in San Francisco's Moscone Center from May 15 through 17.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-F7Zi80rH5BM/UYMEmd03spI/AAAAAAAAARE/HzNpZpS_9Bo/s1600/Screen+Shot+2013-05-02+at+3.38.57+PM.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="281" src="http://4.bp.blogspot.com/-F7Zi80rH5BM/UYMEmd03spI/AAAAAAAAARE/HzNpZpS_9Bo/s400/Screen+Shot+2013-05-02+at+3.38.57+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This year's conference features numerous events of interest to the Dart community. You can see three Dart presentations, and take part in a Dart code lab. One of the talks, by Dart creators Lars Bak and Kasper Lund, will be streamed live. And all of the talks will be available on video.&lt;br /&gt;&lt;br /&gt;If you are at I/O, be sure to stop by at the Dart booth in the Developer Sandbox on the 3rd floor of Moscone Center. You can ask questions of Dart team members who will be available on all three days at the booth, and also at the office hours area nearby.&lt;br /&gt;&lt;br /&gt;Here are some details about the talks and the code lab:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;h3 style="text-align: left;"&gt;&lt;a href="https://developers.google.com/events/io/sessions/324431687"&gt;Web Languages and VMs: Fast Code is Always in Fashion&lt;/a&gt;&lt;/h3&gt;&lt;b&gt;Lars Bak, Kasper Lund&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;A fundamental necessity for innovation within web apps is fast execution speed. This talk will take a deep dive into the machine rooms of both V8 and the Dart VM and explain some of the reasons why a new execution engine is needed for taking the web platform to the next level. Please join us to hear about how programming languages impact the underlying virtual machines, complexity, on-the-fly code generation, and predictable performance.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;When:&lt;/b&gt; May 16, 10:00AM - 11:00AM PDT   &lt;b&gt;Level:&lt;/b&gt; Intermediate   &lt;b&gt;Track:&lt;/b&gt; Chrome &amp;amp; Apps&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style="text-align: left;"&gt;&lt;a href="https://developers.google.com/events/io/sessions/325475052"&gt;What's New in Dart: Your First-class Upgrade to Web Development&lt;/a&gt;&lt;/h3&gt;&lt;b&gt;Seth Ladd&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Come see what's new in Dart with its comprehensive, open-source ecosystem for the modern web developer. Learn how to be more productive with a new language: future-based DOM, package manager, JS-interop, a tree-shaking compiler to JavaScript, SIMD, Web Components, a rich editor, and much more. You'll leave this talk all caught up with Dart and ready to make the web awesome&lt;br /&gt;&lt;br /&gt;&lt;b&gt;When:&lt;/b&gt; May 16, 12:45PM - 1:25PM PDT   &lt;b&gt;Level:&lt;/b&gt; Intermediate   &lt;b&gt;Track:&lt;/b&gt; Chrome &amp;amp; Apps&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style="text-align: left;"&gt;&lt;a href="https://developers.google.com/events/io/sessions/325433525"&gt;Dart: HTML of the Future, Today!&lt;/a&gt;&lt;/h3&gt;&lt;b&gt;Sigmund Cherem, Emily Fortuna&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Develop large apps in a structured language and still experience fast Edit/Reload development cycles? Indeed, the prophecy has come true. Get crazy productive with Dart's tools, smooth HTML libraries, cross-browser polyfills, and web components based framework. Come learn how you can easily and quickly develop web apps that work cross-browser on both desktop and mobile platforms. We'll show you how to build modern web apps with Web Components and dynamic data-driven views without having to wait for cumbersome compile cycles. Make a change, hit reload, and boom, it's ready for all modern browsers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;When:&lt;/b&gt; May 16, 3:30PM - 4:10PM PDT   &lt;b&gt;Level:&lt;/b&gt; Intermediate   &lt;b&gt;Track:&lt;/b&gt; Chrome &amp;amp; Apps&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style="text-align: left;"&gt;&lt;a href="https://developers.google.com/events/io/sessions/384097044"&gt;Mobile Web Apps with Dart and Web Components (code lab)&lt;/a&gt;&lt;/h3&gt;&lt;b&gt;Andrei Mouravski&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You paid for the whole seat but you'll only need the edge! Get hands-on experience and build declarative, modern mobile web apps with Dart and Web Components. Go from zero to magnificent using Dart's structured language, comprehensive libraries, and lightning-fast dev cycle. Learn how to use the Dart toolchain to deploy and test web apps for tablet, phone, and desktop. Yes, you can!&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;When:&lt;/b&gt; May 17, 9:00AM - 11:00AM PDT   &lt;b&gt;Level:&lt;/b&gt; Intermediate   &lt;b&gt;Track:&lt;/b&gt; Chrome &amp;amp; Apps&lt;br /&gt;&lt;br /&gt;&lt;div class="post-body entry-content" id="post-body-2545445767049584406" style="width: 676.022705078125px;"&gt;&lt;div style="background-color: white; clear: both; color: #666666; font-family: 'Open Sans'; font-size: 14.545454025268555px; line-height: 1.4;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/WlujdFDAot4" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 21 May 2013 23:29:42 +0000</pubDate>
	<author>noreply@blogger.com (Shailen Tuli)</author>
<feedburner:origLink>http://news.dartlang.org/2013/05/strong-dart-presence-at-google-io-2013.html</feedburner:origLink></item>
<item>
	<title>Dartlang: Strong Dart presence at Google I/O 2013</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-1636601191077561071.post-6816521315130690266</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/sRis-1gIbUA/strong-dart-presence-at-2013-google-io.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Google I/O 2013 was a breakout event for Dart. The conference featured three well attended Dart talks, a Dart code lab, and a crowded Dart booth.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="background-color: white; color: #666666; font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 16.363636016845703px;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;div style="text-align: left;"&gt;Seth Ladd interviews Lars Bak and Kasper Lund about the state of Dart from the floor of Moscone Center. Dart is now running twice as fast as JavaScript on certain benchmarks. The language and the core libraries are stable, and Dart expects to reach 1.0 status in a few months.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="color: #666666; font-family: inherit; font-size: large;"&gt;Dart sessions at I/O&lt;/span&gt;&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Google I/O 2013 featured three Dart talks (videos embedded below).&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="color: #666666; font-family: inherit; font-size: small;"&gt;Web Languages and VMs: Fast Code is Always in Fashion&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;Lars Bak and Kasper Lund &lt;a href="http://www.blogger.com/%3Ca%20href=%22https://developers.google.com/events/io/sessions/324431687%22%3E"&gt;dove deep into the internals of V8 and the Dart VM&lt;/a&gt;, explaining why the new Dart VM is needed to take the web platform to the next level.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;One popular part of their talk was a demo showing Dart's support for SIMD (single instruction, multiple data) processing. SIMD allows for a big performance boost. Without SIMD, their skeletal animation example supported only about 30 monsters (first image, below). With SIMD, that number increased to about 120 (second image).&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-UyZTtpDxgpw/UZv5sfsfXWI/AAAAAAAAAUc/3OH5lKC8KaQ/s1600/hellnights_before.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/-UyZTtpDxgpw/UZv5sfsfXWI/AAAAAAAAAUc/3OH5lKC8KaQ/s400/hellnights_before.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-KxnXqUAcygA/UZv5TMmfiDI/AAAAAAAAAUQ/5yOl28shE5c/s1600/hellnights_after.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="265" src="http://2.bp.blogspot.com/-KxnXqUAcygA/UZv5TMmfiDI/AAAAAAAAAUQ/5yOl28shE5c/s400/hellnights_after.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;h3 style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; font-size: medium; font-weight: normal; text-align: center;"&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #666666; font-family: inherit; font-size: small;"&gt;Dart: HTML of the Future, Today!&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;Siggi Cherem and Emily Fortuna explained how &lt;a href="https://developers.google.com/events/io/sessions/325433525"&gt;Dart libraries have simplified the web building experience&lt;/a&gt;, and showed how cross-browser polyfills have made web components available for use today.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style="text-align: left;"&gt;&lt;span style="color: #666666; font-family: inherit; font-size: small;"&gt;What's New in Dart: Your First-class Upgrade to Web Development&lt;/span&gt;&lt;/h3&gt;Justin Fagnani and Seth Ladd &lt;a href="https://developers.google.com/events/io/sessions/325475052"&gt;provided a whirlwind tour of the Dart platform&lt;/a&gt; and updated conference attendees on Dart developments since last I/O.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;span style="color: #666666;"&gt;Dart code lab&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: inherit;"&gt;The Dart code lab provided a hands-on experience to participants, who built a mobile-friendly web app using &lt;/span&gt;Dart and the Web UI framework.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-fcfc76l3qxw/UZvBvMPayZI/AAAAAAAAATM/HXVqSKrYtRQ/s1600/Screen+Shot+2013-05-21+at+11.48.46+AM.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-fcfc76l3qxw/UZvBvMPayZI/AAAAAAAAATM/HXVqSKrYtRQ/s640/Screen+Shot+2013-05-21+at+11.48.46+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-family: inherit; font-size: x-small;"&gt;Overflow crowd at the Dart code lab. The number of participants at the code lab increased by over 60% from I/O 2012&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: left;"&gt;&lt;span style="background-color: white; color: #222222;"&gt;&lt;span style="font-family: inherit;"&gt;You can &lt;a href="http://www.dartlang.org/codelabs/web-ui-writer/codelab.pdf"&gt;try the Dart codelab&lt;/a&gt; and build a modern app using the Web UI framework.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;span style="color: #666666;"&gt;Dart booth at the Developer Sandbox&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="background-color: white; color: #404040; line-height: 18px;"&gt;The Dart booth at I/O was a busy, bustling place. Conference attendees got to watch cool Dart demos, interact with Dart engineers, and pick up some nice Dart swag!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-UGKZYDXLwJ8/UZu7TWkCrRI/AAAAAAAAASU/Aba6uaUhk3Y/s1600/dart_booth_performance.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="480" src="http://3.bp.blogspot.com/-UGKZYDXLwJ8/UZu7TWkCrRI/AAAAAAAAASU/Aba6uaUhk3Y/s640/dart_booth_performance.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="font-family: Times, Times New Roman, serif; font-size: x-small;"&gt;&lt;span style="background-color: white; color: #404040; line-height: 18px; text-align: left;"&gt;Shailen Tuli&lt;/span&gt;&lt;span style="background-color: white; color: #404040; line-height: 18px; text-align: left;"&gt; shows the results of benchmarking code in the Dart VM, dart2js, and hand-written JavaScript. The Dart VM won handily, with the JavaScript compiled by dart2js neck and neck with handwritten JavaScript.  &lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;span style="color: #666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;span style="color: #666666;"&gt;Adobe shows off the Toolkit for Dart&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;div&gt;Adobe released the &lt;a href="http://news.dartlang.org/2013/05/adobes-flash-pro-cc-exports-to-dart-and.html"&gt;Toolkit for Dart&lt;/a&gt; for Adobe Flash Professional at I/O. The toolkit lets designers and animators create assets for HTML5 projects using Dart libraries and supports most of the core animation and illustration capabilities of Flash Professional.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-S79NqJ_R9BE/UZu7lMNcteI/AAAAAAAAASk/5oD59GZJjFQ/s1600/adobe_booth.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/-S79NqJ_R9BE/UZu7lMNcteI/AAAAAAAAASk/5oD59GZJjFQ/s640/adobe_booth.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;span style="background-color: white; color: #404040; line-height: 18px; text-align: start;"&gt;&lt;span style="font-family: inherit; font-size: x-small;"&gt;Playing an HTML5 game built with Flash Pro, exported to Dart with the push of a button! &lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;h2&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;span style="color: #666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;&lt;span style="color: #666666;"&gt;Dart at the JetBrains booth&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="text-align: left;"&gt;JetBrains featured their &lt;a href="http://plugins.intellij.net/plugin/?id=6351" style="background-color: white; border: 0px; color: #4183c4; font-family: inherit; line-height: 22.727272033691406px; margin: 0px; padding: 0px;"&gt;Dart plugin for the IntelliJ/WebStorm IDE&lt;/a&gt;.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-D2uXMfH-Mvw/UZu7izp22gI/AAAAAAAAASc/wxtCtWm7lN8/s1600/intellij_photo.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="480" src="http://4.bp.blogspot.com/-D2uXMfH-Mvw/UZu7izp22gI/AAAAAAAAASc/wxtCtWm7lN8/s640/intellij_photo.jpg" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;An attendee gets a tour of the features available to Dart developers.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="color: #666666; font-family: inherit; font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style="text-align: left;"&gt;&lt;span style="color: #666666; font-family: inherit; font-size: large;"&gt;I/O news coverage about Dart&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://news.cnet.com/8301-17939_109-57584979-2/google-dart-will-rescue-browsers-from-javascript/"&gt;Stephen Shankland at CNET&lt;/a&gt; prominently covered the talk by Lars Bak and Kasper Lund on VM performance. Here's an excerpt:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-jRI_59_63H8/UZu9RglfIEI/AAAAAAAAASw/Y5SQKMf2FlM/s1600/dart_will_rescue.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-jRI_59_63H8/UZu9RglfIEI/AAAAAAAAASw/Y5SQKMf2FlM/s640/dart_will_rescue.png" width="569" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a href="http://www.huffingtonpost.com/john-pavley/google-io-day-two_b_3290293.html"&gt;John Pavley at the Huffington Post&lt;/a&gt; covered Dart in his round up of Google I/O news:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-WKkgN6j0uOM/UZu-KVr2DUI/AAAAAAAAAS8/sOy0uhWfIQA/s1600/huffington_post.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="excerpt from huffpo article" border="0" height="160" src="http://1.bp.blogspot.com/-WKkgN6j0uOM/UZu-KVr2DUI/AAAAAAAAAS8/sOy0uhWfIQA/s640/huffington_post.png" title="" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To get an even better feel for Dart at Google I/O 2013, look for &lt;a href="https://plus.google.com/s/%23io13%20%23dartlang"&gt;#io13 #dartlang on Google+&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/sRis-1gIbUA" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 21 May 2013 23:04:27 +0000</pubDate>
	<author>noreply@blogger.com (Shailen Tuli)</author>
<feedburner:origLink>http://news.dartlang.org/2013/05/strong-dart-presence-at-2013-google-io.html</feedburner:origLink></item>
<item>
	<title>Dartlang: Notes from May 6th Dart Language Design Meeting</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-1636601191077561071.post-662267447287494214</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/KO5Iku6mhbI/notes-from-may-6th-dart-language-design-meeting.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: inherit;"&gt;The incomporable &lt;a href="https://plus.google.com/100798142896685420545/posts"&gt;Bob Nystrom&lt;/a&gt; fills us in on the language design discussions taking place amongst Dart engineers. Here are his &lt;a href="https://groups.google.com/a/dartlang.org/d/msg/misc/vlWcc43EnL4/eoyMz3xzhSoJ"&gt;notes from the May 6th language meeting&lt;/a&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="background-color: white; clear: both; color: #666666; font-size: 13.63636302947998px; line-height: 16.363636016845703px;"&gt;&lt;span style="font-family: inherit; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="background-color: white; clear: both; color: #666666; font-size: 13.63636302947998px; line-height: 16.363636016845703px;"&gt;&lt;/div&gt;&lt;div style="background-color: white; border: 0px; color: #222222; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div class="separator" style="clear: both; color: #666666; font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 16.363636016845703px;"&gt;&lt;/div&gt;&lt;div style="border: 0px; color: #222222; font-size: 12.800000190734863px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="border: 0px; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;div style="font-size: 13px;"&gt;&lt;b&gt;API maturity annotations&lt;/b&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars says Dan Grove wants a decision on annotations that denote maturity of source code. For most stuff, Lars thinks we should just annotate the whole library. The place where makes sense is dart:html. In that case, we can make an exception.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;I asked if this is a language question, or just a question for people at the level of the language team.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars says Dan specifically said for the language.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Everyone agreed this is a good idea for the Dart system. &lt;i&gt;[Gilad later clarified that they all also agree it is not a language issue.]&lt;/i&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars says everything except dart:html we'll put in the libraries.dart config file. We can show that in the Editor.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;i&gt;[Dan later clarified was that his question was the meta-question to decide if this issue is a language issue or not.]&lt;/i&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;b&gt;? operator&lt;/b&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Gilad: Can we get rid of it?&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars: Yes.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Gilad: OK, done.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;b&gt;map literals&lt;/b&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars asks if everyone likes the new proposal [that Gilad sent to the language team]. Everyone does.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;i&gt;[This is now in the &lt;a href="http://www.dartlang.org/docs/spec/" style="color: #1155cc;" target="_blank"&gt;latest published spec&lt;/a&gt;. Basically, &lt;b&gt;you can have non-string keys in map literals.&lt;/b&gt; Woo!]&lt;/i&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;b&gt;exports&lt;/b&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars says Florian has some issues about exports. Asked if Gilad is talking to him about it.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;i&gt;[This is the same issue about exports that came up on the mailing list recently.]&lt;/i&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;b&gt;library names&lt;/b&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Gilad says Kasper's proposal looks fine. Given other decisions we've made, it makes things more consistent.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;Lars is reluctantly accepting it.&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-size: 13px;"&gt;This means it will be a static warning to import multiple libraries with the same name. This is a breaking change so we should let people know it's coming.&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;span style="font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 18.18181800842285px;"&gt;As always, view the &lt;/span&gt;&lt;a href="http://gsdview.appspot.com/dart-editor-archive-integration/latest/changelog.html" style="color: #1155cc; font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 18.18181800842285px; text-decoration: none;" target="_blank"&gt;changelog&lt;/a&gt;&lt;span style="font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 18.18181800842285px;"&gt; for the full list of changes, and to get started with the Editor see our &lt;/span&gt;&lt;a href="http://www.dartlang.org/editor/" style="color: #1155cc; font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 18.18181800842285px; text-decoration: none;" target="_blank"&gt;tutorial&lt;/a&gt;&lt;span style="font-family: 'Open Sans'; font-size: 13.63636302947998px; line-height: 18.18181800842285px;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/KO5Iku6mhbI" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 20 May 2013 21:51:16 +0000</pubDate>
	<author>noreply@blogger.com (Shailen Tuli)</author>
<feedburner:origLink>http://news.dartlang.org/2013/05/notes-from-may-6th-dart-language-design-meeting.html</feedburner:origLink></item>
<item>
	<title>Dartlang: Adobe's Flash Pro CC Exports to Dart and HTML5</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-1636601191077561071.post-7245518139340770844</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/pHwbTbg3XOw/adobes-flash-pro-cc-exports-to-dart-and.html</link>
	<description>&lt;br /&gt;At Google I/O today, Adobe announced their new Toolkit for Dart, a plugin for Flash Professional CC that allows developers to export their animations and games to &lt;a href="http://www.dartlang.org/"&gt;Dart&lt;/a&gt; code and HTML5.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;img border="0" height="360" src="http://4.bp.blogspot.com/-q3VppxXiK20/UZPXJsJibEI/AAAAAAAAB4E/PqYmZsjFPO4/s640/_0002_Select-the-Toolkit-for-Dart.png" width="640" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;"Adobe is delighted to announce the Toolkit for Dart, an extension that enables web designers and animators to publish their Flash content to Dart." said Tom Barclay, Sr. Product Manager at Adobe. With the Toolkit, developers, designers, and animators can create interactive, animated content inside of Flash Pro and publish to the Dart language and HTML5 APIs. Because Dart compiles to JavaScript, the content runs across modern desktop and mobile browsers without plugins.&lt;br /&gt;&lt;br /&gt;Toolkit for Dart supports many of the core animation and drawing capabilities of Flash Pro, including bitmaps, shapes, movie clips, graphic symbols, classic tweens and motion guides, simple buttons, text fields, drop-shadow and glow filters, additive blend mode, single-shape masks, visible and cacheAsBitmap display options, and embedded audio. The Toolkit generates Dart code that represents items on the stage, symbols, images, and sounds in the library.&lt;br /&gt;&lt;br /&gt;The Toolkit doesn't translate ActionScript to Dart. Instead, developers write Dart code for the interactive parts of the content. Dart is similar to ActionScript 3: it is a familiar, class-based, object-oriented language with rich core libraries, optional static types, and more.&lt;br /&gt;&lt;br /&gt;The extension leverages the &lt;a href="http://www.stagexl.org/"&gt;StageXL for Dart&lt;/a&gt; library to reproduce Flash runtime features. The StageXL library is a complete and robust Flash-like engine for Canvas that is built on top of the Dart programming language. StageXL provides an approachable Flash-like API to build games and other graphically rich content. It is intended for Flash/ActionScript developers who want to migrate their projects as well as their skills to HTML5. Bernhard Pichler, author of StageXL, asks you to "use your creativity to enrich the modern Web."&lt;br /&gt;&lt;br /&gt;Adobe plans to contribute the Toolkit to the open source community. The Toolkit for Dart is expected to be available as a Github repo shortly after &lt;a href="http://www.adobe.com/products/flash.html"&gt;Flash Professional CC&lt;/a&gt; is released on June 17.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/pHwbTbg3XOw" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 15 May 2013 19:30:02 +0000</pubDate>
	<author>noreply@blogger.com (Seth Ladd)</author>
<feedburner:origLink>http://news.dartlang.org/2013/05/adobes-flash-pro-cc-exports-to-dart-and.html</feedburner:origLink></item>
<item>
	<title>Dartwatch: Lots of new ways to keep up with #dartlang changes</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8928104154571388295.post-7464659969185262447</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/oM1_V_vKq18/lots-of-new-ways-to-keep-up-with.html</link>
	<description>&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;The Dartisans community has grown, with currently &amp;gt;2000 members on the &lt;a href="https://plus.google.com/u/0/communities/114566943291919232850" target="_blank"&gt;+Dartisans group&lt;/a&gt;, and &amp;gt;1500 subscribers to the &lt;a href="http://dartweekly.com/" target="_blank"&gt;Dart Weekly&lt;/a&gt; newsletter.  Keeping up with the latest changes can be tricky.&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;Google's Andrei Mouravski has &lt;a href="https://groups.google.com/a/dartlang.org/d/msg/announce/lxfHPJSnRcg/8dGxGG36giUJ" style="background-color: transparent; line-height: 1.15; white-space: pre-wrap;" target="_blank"&gt;just posted&lt;/a&gt;&lt;span style="background-color: transparent; color: black; line-height: 1.15; white-space: pre-wrap;"&gt; this on the mailing lists:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; line-height: 1.15; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; line-height: 1.15; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="background-color: transparent; border: 0px; color: black; font-family: Arial; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="background-color: transparent; border: 0px; color: black; font-family: Arial; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;tl;dr&lt;/span&gt;&lt;span style="background-color: transparent; border: 0px; color: black; font-family: Arial; font-size: 15px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: We have some new discussion groups. Sign up for &lt;/span&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/announce" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-size: 15px; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;announce@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; border: 0px; color: black; font-family: Arial; font-size: 15px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;. &lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="background-color: transparent; border: 0px; color: black; font-family: Arial; font-size: 15px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;For a quick summary, read the Guidelines section below.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="border: 0px; font-family: Arial; font-size: 15px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;Hello Dartisans!&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;As our community has grown, so has discussion around Dart, so we have created four new discussion groups, and updated a few others.&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;New Groups:&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/announce" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;announce@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; : Dart Announcements&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;This group is for official announcement for the Dart project. This will be product releases, breaking changes, major events, press briefs, and other important messages for the entire Dart community. For now, the group will remain limited to a select group of individuals who manage specific parts of the Dart project.&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;I recommend signing up for this group today, as it is a low volume way to stay up to date with Dart on a day-to-day level.&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;---&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;Note: &lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;Replies to announcements in this group should go to &lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8928104154571388295" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; vertical-align: baseline;" target="_blank"&gt;dart...@dartlang.org&lt;/a&gt;&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; to keep the announce list noise-free, but still provide a forum for discussion.&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;br /&gt;For the time being, posts to &lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8928104154571388295" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; vertical-align: baseline;" target="_blank"&gt;anno...@dartlang.org&lt;/a&gt;&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; will be forwarded to &lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8928104154571388295" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; vertical-align: baseline;" target="_blank"&gt;mi...@dartlang.org&lt;/a&gt;&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;. &lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;In a few weeks we will remove the forward to &lt;/span&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=8928104154571388295" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; color: #222222; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;misc@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; to prevent unnecessary duplicate e-mails, so sign up now!&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/dart-dev" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;dart-dev@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; : Dart Core Project and Libraries Development&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;This is the list to go to if you want to discuss the development of the Dart open source project. As the project continues to grow, it’s important to be able to stay connected with state of the core of Dart itself. &lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;This is a good place to talk about core library APIs, discuss breaking changes, and interact with the Dart engineering team. If you’re thinking of contributing to the Dart project, let us know in this group!&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;This list will be more technical than some of the other lists, so keep that in mind when subscribing. You should subscribe to this list if you’re interested in keeping up with day to day Dart development and engineering.&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;---&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;Note&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: If your discussion is about a project you’ve created, broad feature requests such as other languages’ features you’d like to see in Dart, the state of the web/JavaScript/html5/etc., news, links, or events, then please post to &lt;/span&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/misc" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;misc@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;. See the guidelines below.&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/html-dev" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;html-dev@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; : Dart DOM/HTML Libraries Development&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;If you want to keep up with the latest developments to the HTML/DOM libraries, here’s where to go! The libraries in question are: dart:html, dart:svg, dart:web_audio, dart:web_gl, dart:indexed_db, dart:web_sql, and dart:chrome, but it’s possible there will be more. This is the group to follow to hear about changes to DOM bindings.&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;I recommend signing up for this group, as it is a medium volume way to stay up to date with anything changing in the main DOM libraries. If you build client applications, or just care about the modern web, stay tuned!&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/editor" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;editor@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; : Dart Editor and Plugin Development and Discussion&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 60pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;If you use the Dart Editor to write Dart code, or debug Dart applications, or for any reason at all, this is the group for you. The Editor team loves, probably more than any other team, receiving feedback. This list is a great place to talk about what you want to see in the Editor, and discuss the state of the Dart IDE.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;---&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;Other groups:&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;Just a reminder about the other groups we have:&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/misc" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;misc@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: Miscellaneous Discussion&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/vm-dev" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;vm-dev@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: Dart VM Development&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/compiler-dev" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;compiler-dev@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: dart2js Development&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/web-ui" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;web-ui@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: Dart Web UI Package Discussion&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;The following groups are read-only, as their posts are auto-generated:&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/commits" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;commits@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: Commits to the Dart Repository&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/bugs" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;bugs@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: Dart Issue Tracker Updates&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-left: 30pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/reviews" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;reviews@dartlang.org &lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;: Dart Code Review Updates&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;---&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div dir="ltr" style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;And just to be clear, here are guidelines for posting to any of the groups:&lt;/span&gt;&lt;/div&gt;
&lt;br style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px;" /&gt;
&lt;span style="background-color: white; border: 0px; color: #222222; font-family: Arial; font-size: 16px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;

&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; font-size: medium; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Guidelines&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;ul&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;For &lt;/span&gt;&lt;b style="line-height: normal;"&gt;HOWTO questions,&lt;/b&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; consider asking on &lt;/span&gt;&lt;a href="http://stackoverflow.com/tags/dart" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; line-height: normal; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;StackOverflow&lt;/a&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;If you can phrase your question as "how do I do &lt;b&gt;&lt;i&gt;X&lt;/i&gt;&lt;/b&gt;?" then &lt;a href="http://stackoverflow.com/tags/dart" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;StackOverflow&lt;/a&gt; is the place for you.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style="line-height: 17px;"&gt;For &lt;b&gt;bug reports&lt;/b&gt; and &lt;b&gt;feature requests&lt;/b&gt;, file a new issue at &lt;a href="http://www.dartbug.com/new" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; line-height: normal; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;www.dartbug.com/new&lt;/a&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;For &lt;/span&gt;&lt;b style="line-height: normal;"&gt;Web UI &lt;/b&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;questions&lt;/span&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;, see the &lt;/span&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/#!forum/web-ui" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; line-height: normal; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;web-ui@dartlang.org&lt;/a&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; group, which has links and resources in its welcome message.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;If your question is about how to use the Web UI package, try &lt;/span&gt;&lt;a href="http://stackoverflow.com/tags/dart-webui" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; line-height: normal; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;StackOverflow&lt;/a&gt; first.&lt;/li&gt;
&lt;/ul&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;For &lt;b&gt;Dart Editor &lt;/b&gt;questions, use the &lt;a href="https://groups.google.com/a/dartlang.org/forum/#!forum/editor" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;editor@dartlang.org&lt;/a&gt; group.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;If you are reporting a bug or a crash, use the "SEND FEEDBACK" button in the Editor itself, or use &lt;/span&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="http://www.dartbug.com/new" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;www.dartbug.com/new&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;For questions about &lt;b&gt;dart:html &lt;/b&gt;development, use the &lt;a href="http://groups.google.com/a/dartlang.org/group/html-dev" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;html-dev@dartlang.org&lt;/a&gt; group.&lt;/span&gt;&lt;/li&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;For questions about &lt;/span&gt;&lt;b style="line-height: normal;"&gt;VM &lt;/b&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;development&lt;/b&gt;&lt;/span&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;, use the &lt;/span&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/#!forum/vm-dev" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;vm-dev@dartlang.org&lt;/a&gt; group.&lt;/span&gt;&lt;/li&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;For questions about &lt;b&gt;dart2js development&lt;/b&gt;&lt;/span&gt;&lt;span style="border: 0px; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;, use the &lt;/span&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/#!forum/compiler-dev" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; line-height: normal; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;compiler-dev@dartlang.org&lt;/a&gt; group.&lt;/li&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; font-family: Arial; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;For all other discussions about &lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;code Dart development&lt;/span&gt;&lt;span style="border: 0px; font-family: Arial; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;, use the &lt;/span&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/dart-dev" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; font-family: Arial; line-height: 18px; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;dart-dev@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span style="border: 0px; line-height: 18px; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; group.

&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="line-height: 17px;"&gt;&lt;span style="border: 0px; font-family: Arial; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt;For everything else that doesn’t fit any of the above, use the &lt;/span&gt;&lt;a href="https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/misc" rel="nofollow" style="border: 0px; color: #6611cc; cursor: pointer; line-height: normal; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;&lt;span style="border: 0px; font-family: Arial; font-weight: bold; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;misc@dartlang.org&lt;/span&gt;&lt;/a&gt;&lt;span style="border: 0px; font-family: Arial; line-height: normal; margin: 0px; padding: 0px; vertical-align: baseline; white-space: pre-wrap;"&gt; group.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=K0Q8o-dMqfA:Skk6Xfs56YE:yIl2AUoC8zA"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=yIl2AUoC8zA" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=K0Q8o-dMqfA:Skk6Xfs56YE:V_sGLiPBpWU"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=K0Q8o-dMqfA:Skk6Xfs56YE:V_sGLiPBpWU" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=K0Q8o-dMqfA:Skk6Xfs56YE:qj6IDK7rITs"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=qj6IDK7rITs" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=K0Q8o-dMqfA:Skk6Xfs56YE:63t7Ie-LG7Y"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=63t7Ie-LG7Y" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=K0Q8o-dMqfA:Skk6Xfs56YE:F7zBnMyn0Lo"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=K0Q8o-dMqfA:Skk6Xfs56YE:F7zBnMyn0Lo" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img height="1" src="http://feeds.feedburner.com/~r/Dartwatch/~4/K0Q8o-dMqfA" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/oM1_V_vKq18" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 13 May 2013 12:55:55 +0000</pubDate>
	<author>noreply@blogger.com (Chris Buckett)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/Dartwatch/~3/K0Q8o-dMqfA/lots-of-new-ways-to-keep-up-with.html</feedburner:origLink></item>
<item>
	<title>Shannon -jj Behrens: Personal: Links to My G+ and Twitter Accounts</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-11788780.post-5879716667265856659</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/JgcVYDVhajw/personal-links-to-my-g-and-twitter.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;If you enjoy my blog posts on Python, Ruby, Dart, etc., and you're looking for a new way to follow me now that Google Reader is going away, here are my Twitter and G+ accounts:&lt;br /&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="https://twitter.com/jjinux"&gt;@jjinux&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://plus.google.com/u/0/115478738847874567952/posts"&gt;gplus.to/jjinux&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/JgcVYDVhajw" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 10 May 2013 18:15:00 +0000</pubDate>
	<author>noreply@blogger.com (Shannon Behrens)</author>
<feedburner:origLink>http://jjinux.blogspot.com/2013/05/personal-links-to-my-g-and-twitter.html</feedburner:origLink></item>
<item>
	<title>Christian Grobmeier: Review: Dart in Action</title>
	<guid isPermaLink="false">http://www.grobmeier.de/?p=2038</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/Eoj0Rp2ovbQ/review-dart-in-action-08052013.html</link>
	<description>&lt;p&gt;&lt;img alt="&amp;quot;Dart in Action&amp;quot; by Chris Buckett" class="alignleft size-medium wp-image-2042" height="300" src="http://www.grobmeier.de/wp-content/uploads/2013/05/dartinaction-239x300.jpg?9d7bd4" width="239" /&gt;Recently I read “&lt;a href="http://www.manning.com/buckett/" target="_blank"&gt;Dart in Action&lt;/a&gt;” by &lt;a href="http://dartwatch.com" target="_blank"&gt;Chris Buckett&lt;/a&gt;. I know Chris from the early days of the Dart language. We both joined the community almost instantly. At the day of Darts arrival, he founded &lt;a href="http://Dartwatch.com" target="_blank"&gt;Dartwatch.com&lt;/a&gt; and blogs on all aspects of the language. Chris is definitely one of these guys who knows what he writes. After one year, a lot of blog posts, countless e-mails to the Dart mailing lists and doing a lot of other community related things, he finished a book on Dart.&lt;/p&gt;
&lt;p&gt;A book? This alone is impressive. Dart is a kind of moving target. There is a lot of man-power behind its development and every day there are a lots of changes to Darts codebase. Dart arrived as a technical preview and as such it was &lt;em&gt;allowed&lt;/em&gt; to have breaking changes. Chris was not only confronted with learning a language by looking at its specification and find out about hidden features in the bug trackers; he also had to rewrite whole sections over and over again just because the language changed. A simple example: suddenly the + operator for string concatenations was removed. A more complicated example: the whole library/import thing changed.&lt;/p&gt;
&lt;p&gt;Still Chris kept on writing. Finally Dart became more stable in its core, and the book was released. What I got was a book from a dedicated and passionate Dart-developer, who knows the language, its ecosystem and the community from day 1.&lt;/p&gt;
&lt;p&gt;The book itself reads like that. &lt;strong&gt;It’s a fantastic book which takes you by hand and leads you through the whole world of Dart.&lt;/strong&gt; With that I mean it doesn’t stop at just explaining some grammar or how to use API $x. Dart is not “only a language”. Dart is a whole ecosystem consisting of language, APIs AND tools. Chris shows from the beginning where you need to look at, like using the Dart Editor or how to deal with third party dependencies.&lt;/p&gt;
&lt;p&gt;You almost do not recognize how you get into all these new technologies. While he explains how to write code, he also shows how to debug it or what you can do with it in practice. It is far from boring grammar descriptions or rephrased API docs as one can often find in books. You can work on your program while reading this book. It’s for people like me, who do not want to read through 500 pages with boring examples just to make up something cool after the memorized all of the thousand keywords. This book shows you what you can do, how you do it, and what you should be aware of. It’s easy to connect the books content with your real-life-problems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The writing style is clear, precise and well balanced. An easy read.&lt;/strong&gt; The tune is one of a colleague who did find some great new toy to play with and now explains it to you. It is a motivating and inspiring text and very enjoyable. There was not a single chapter which made me bored or drifting away.&lt;/p&gt;
&lt;p&gt;The content is a great mix of everything important in Dart.&lt;/p&gt;
&lt;p&gt;You will learn about running Dart from the Browser but also how to run it from the shell, maybe when building your backend with Dart. You learn how you can write test driven code. Unit testing with Dart is especially something which I did not know much about before. In the early days of Dart it was not so much a topic, and due to work I did not follow it to closely later. Chris sent me back on track. Now I even know how to do browser testing, which is big win for me.&lt;/p&gt;
&lt;p&gt;He explains on how properly to use classes, interfaces and constructors. Also he looks into libraries and shows possibilities here. What I like much is the fact he is &lt;strong&gt;also explaining best practices&lt;/strong&gt;. Not only Darts best practice, but general ones. These are experiences he made maybe from his time as GWT developer. They are very helpful if you just start with your programming career.&lt;/p&gt;
&lt;p&gt;In general, the core part of this book feels complete and balanced. There is even a part describing Futures and Completers. Both are heavily used async concepts in todays browser programming world, and with “Dart in Action” it is easy to get into them. Another bonus point is he is explaining how you can test asynchronous code. As this is a very difficult matter, I have not expected that.&lt;/p&gt;
&lt;p&gt;The chapters on client development are also very good. One can first find a great introduction into single-page web apps. I wished I would have read this before a long time now. It also gives you a great view how you can actually build your Dart app. If you are coming from the classic approach of maintaining multiple pages, you might find this section very useful. He is also writing on how to use Cookies and Data Storage. Especially the browser db part I found very interesting.&lt;/p&gt;
&lt;p&gt;One often asked question is how to interact with JavaScript from Dart and vice versa. You will find an answer in this book. Even more: Chris describes how to make apps for the Chrome web store. With this, you already have enough knowledge to start with your App, integrate it to existing libs and finally deploy it to its final destination. A complete cycle. But there is even more.&lt;/p&gt;
&lt;p&gt;The book closes with looking at server side Dart. It’s shown how to interact with Apache CouchDB as data store and how one can serve HTTP requests with Dart. Everybody who is into Node.js knows that it is a great feeling to just use the same language for frontend and backend. Finally he looks into Isolates, one of my favorite topics. Even when I know a lot on Isolates (some kind of multithreading in Dart), I found this is a very competent introduction into it and  I did not regret to have it read.&lt;/p&gt;
&lt;p&gt;My conclusion is this a great book. Usually I do not read books on programming languages anymore. They tend to be boring and quickly out of date. But this book is different. It shows you more than just grammar and APIs. It shows you how to move in the Dart world. How you solve things. &lt;strong&gt;It’s an enjoyable read from a very competent Dart programmer.&lt;/strong&gt; If you want to learn Dart you already have the great docs on the website. But &lt;strong&gt;if you would like to get even more quickly into Dartlang, then you should definitely look at this book.&lt;/strong&gt; Despite the language is still evolving, most of its content will be true for a long time. If not, then the author can be found in one of the Dart communities.&lt;/p&gt;
&lt;p&gt;You can buy this book on &lt;a href="http://www.amazon.com/gp/product/1617290866/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1617290866&amp;amp;linkCode=as2&amp;amp;tag=christgrobme-20" target="_blank"&gt;Amazon.com&lt;/a&gt; or on &lt;a href="http://www.amazon.de/gp/product/1617290866/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;camp=1638&amp;amp;creative=6742&amp;amp;creativeASIN=1617290866&amp;amp;linkCode=as2&amp;amp;tag=neoteccde-21" target="_blank"&gt;Amazon.de&lt;/a&gt; (affiliate links).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/Eoj0Rp2ovbQ" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 08 May 2013 12:02:52 +0000</pubDate>
<feedburner:origLink>http://www.grobmeier.de/review-dart-in-action-08052013.html</feedburner:origLink></item>
<item>
	<title>Dartwatch: Campaign to use real logging (instead of print) in your libraries and apps</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8928104154571388295.post-3204078750363522649</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/8rFYBG6BHpE/campaign-to-use-real-logging-instead-of.html</link>
	<description>&lt;blockquote class="tldr-embed-widget"&gt;
&lt;a class="link-to-tldr-page" href="http://tldr.io/tldrs/5189530a8cee89666f000745/campaign-to-use-real-logging-in-dart" target="_blank"&gt;Summary of "Campaign to use real logging in Dart"&lt;/a&gt; (via &lt;a href="http://tldr.io/" target="_blank"&gt;tldr.io&lt;/a&gt;)&lt;br /&gt;
&lt;ul&gt;
&lt;li style="line-height: 130%; margin-bottom: 10px;"&gt;Using print() statements for debugging in your libraries means that everyone gets your print() output.&lt;/li&gt;
&lt;li style="line-height: 130%; margin-bottom: 10px;"&gt;The Dart SDK has a "logging" package built in (that lets you write into a logging framework), but nothing to output those log messages.&lt;/li&gt;
&lt;li style="line-height: 130%; margin-bottom: 10px;"&gt;The "logging_handlers" package adds those missing handlers, letting you output to the console (like print),  filesystem (server side), and a webui component.&lt;/li&gt;
&lt;li style="line-height: 130%; margin-bottom: 10px;"&gt;Now you (and I) can control the logging output from different libraries by varying the logging level different libraries.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;


&lt;h1 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 30px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Stop Using &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print(msg)&lt;/code&gt; start using &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;info(msg)&lt;/code&gt;&lt;/h1&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
When you use &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt;, other users of your code have to see all your internal debug logging (I know I'm guilty of this, too).&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging_handlers&lt;/code&gt; package lets you use proper logging in your client-side or server side Dart application.&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Why?&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
When I use your library (or when you use my library), I want to control the amount of logging output from your debug messages (and, I hope, you want to do the same for my debug messages). By using the Dart logging framework, we can both be happy.&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
There are two parts involved in logging:&lt;/h2&gt;
&lt;ol style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px 0px 12px 25px; padding: 0px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Sending log messages into a logging framework&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Outputting the log messages somewhere (eg, to the stdout, a file, the browser).&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Dart's &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt; sort of covers both of these use cases, and the quick'n'dirty alternative described below also does the same thing. It's not the best way, but at least it means that log messages can be output somewhere other than the console (such as a file).&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
First, some background about logging&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Dart's &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging&lt;/code&gt; pub package, that forms part of the Dart SDK, covers use-case 1, in other words, it lets you send log messages into a logging framework.&lt;br /&gt;
This framework lets you attach &lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;handlers&lt;/strong&gt; to that framework that can listen to the stream of log messages.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
This package, &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging_handlers&lt;/code&gt; provides some default handlers that lets you output messages to a variety of locations, in a variety of formats.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
At the moment, you can output a log message as a tab delimited &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;String&lt;/code&gt; or a &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;JSON&lt;/code&gt;able&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;Map&lt;/code&gt;, and you can output a log message to the console similar to &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt;, to a server-side file, or to a client-side web-ui component (or a mixture).&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
The quickest (and dirtiest) way to replace &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt;&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
This is not the &lt;em style="border: 0px; font-family: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;best&lt;/em&gt; way, but it's certainly better than &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt;.&lt;/div&gt;
&lt;ol style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px 0px 12px 25px; padding: 0px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Add &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging_handlers&lt;/code&gt; package to pubspec.yaml&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;import 'package:logging_handlers/logging_handlers_shared.dart';&lt;/code&gt;&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Use &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;debug(msg)&lt;/code&gt;, &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;info(msg)&lt;/code&gt;, &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;warn(msg)&lt;/code&gt;, &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;error(msg)&lt;/code&gt; as appropriate.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Somewhere in your initialization code (start of your unit tests, &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;main()&lt;/code&gt; or other initialization code), call &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;startQuickLogging()&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
For example:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;import 'package:logging_handlers/logging_handlers_shared.dart';

main() {
    startQuickLogging();
    info("Hello World");
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
will output to the console:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;2013-05-06 16:42:42.593     [INFO]: Quick'n'Dirty logging is enabled.  It's better to do it properly, though.
2013-05-06 16:42:42.604     [INFO]: Hello World
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Note:&lt;/strong&gt; Dart's logging has more fine grained logging levels - the top-level functions above are shorthand for some of these:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;             FINEST // highly detailed tracing
             FINER // fairly detailed tracing 
debug(msg) = FINE // tracing information
             CONFIG // static configuration messages
info(msg)  = INFO // informational messages
warn(msg)  = WARNING // potential problems
error(msg) = SEVERE // serious failures
             SHOUT // extra debugging loudness
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
But see below for better ways that allow users of your code more control over what actually gets output, and let you have finer-grained control over logging.&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
The a slightly better way (but still a bit quick'n'dirty) to replace &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt;&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Let users of your code filter out your specific log messages by giving your log messages a name. The best name is the name of your library. for example:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;library my_library; 
import 'package:logging_handlers/logging_handlers_shared.dart';

class Foo() {
  Foo() {
    debug("Foo is created", "my_library"); // calls debug with your library name
  }
}

main() {
  startQuickLogging();
  new Foo(); 
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
this outputs:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;2013-05-06 16:42:42.593     [INFO]: Quick'n'Dirty logging is enabled.  It's better to do it properly, though.
2013-05-06 16:42:42.604 my_library      [FINE]: Foo is created
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
When you include your library name in your log messages, other users of your code can filter your log messages out (more on that later).&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
The best way to implement logging in your libraries&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Create a &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;Logger&lt;/code&gt; instance in your library, and give it the name of your library:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;library my_library;
import 'package:logging_handlers/logging_handlers_shared.dart';

final _logger = new Logger("my_library");

class MyClass {
    MyClass() {
       _logger.fine("MyClass created");
    }

    foo() {
      _logger.error("Something bad has happened");
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
You can have as many loggers as you need, and they can be hierarchical (using a &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;.&lt;/code&gt; to separate). For example, you might have a top-level logger, and individual loggers for specific classes:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;library my_library;
import 'package:logging_handlers/logging_handlers_shared.dart';

final _libraryLogger = new Logger("my_library"); // top level logger

class MyClass {

  // MyClass logger is a child of my_library logger
  static final _logger = new Logger("my_library.MyClass");

  MyClass() {
     MyClass._logger.fine("MyClass created"); // using class logger
  }

  foo() {
    _libraryLogger.error("Something bad has happened"); // using top-level logger
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
When you use hierarchical logging, you (and your code's users) can start to take control over what actually gets output, and to where (such as outputting ALL logging for MyClass, but only WARNING, SEVERE and SHOUT logging for the library).&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Now that you've seen how to emit log messages into a framework, let's take a look at how to control where those messages go&lt;/strong&gt;&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Controlling log message output&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The code in your classes and libraries don't actually run until you pull them into a Dart application (or unit test) via the top-level &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;main()&lt;/code&gt; function.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
In the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;main()&lt;/code&gt; function, you need to initialize the logging framework with a logging handler. The simplest version of this is the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;PrintHandler&lt;/code&gt;, which outputs log messages to the console in the same way that &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt; does.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Let's assume that you've implemented logging using "the best way" which contains your logger name.&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;// the SDK logging framework
import 'package:logging/logging.dart'; 
// Handlers that are shared between client and server
import 'package:logging_handlers/logging_handlers_shared.dart'; 
// your library, from above...
import 'my_library';

main() {
  Logger.root.onRecord.listen(new PrintHandler()); // default PrintHandler
  var myclass = new MyClass(); // from above - outputs log message
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
If you're on the server-side, and you want to log to a file, the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging_handlers&lt;/code&gt; package includes a very simple (synchronous) filesystem log file handler: &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;SyncFileLoggingHandler&lt;/code&gt;.&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;// the SDK logging framework
import 'package:logging/logging.dart'; 
// Handlers that run server-side
import 'package:logging_handlers/server_logging_handlers.dart'; 
// your library, from above...
import 'my_library';

main() {
  Logger.root.onRecord.listen(new SyncFileLoggingHandler("myLogFile.txt")); 
  var myclass = new MyClass(); // from above - outputs log message
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
And if you're on the client side, there's a handy (and incredibly basic) web component&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;&amp;lt;x-loggerui&amp;gt;&lt;/code&gt; to output log messages on screen.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
In your Web UI enabled application, your HTML will look something like this:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;!-- import the loggerui component --&amp;gt;
    &amp;lt;link rel="import" href="package:logging_handlers/src/client/loggerui.html"&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;   
    &amp;lt;!-- other content... --&amp;gt;

    &amp;lt;x-loggerui&amp;gt;&amp;lt;/x-loggerui&amp;gt;  &amp;lt;!-- Logger widget --&amp;gt;

    &amp;lt;!-- standard app scripts --&amp;gt;
    &amp;lt;script type="application/dart" src="test.dart"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script src="packages/browser/dart.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
And in your app's main() function, you call &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;attachXLoggerUi()&lt;/code&gt; like this:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;import 'package:logging_handlers/browser_logging_handlers.dart';

main() {
  attachXLoggerUi(); // lives in the browser_logging_handlers library
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;attachXLoggerUi&lt;/code&gt; function runs in the next event loop iteration after main (using&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;Timer.run&lt;/code&gt;), so any startup logging won't appear. This is because the web component's themselves aren't available until the next event loop.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Here is a running example:

&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Attaching multiple handlers&lt;/strong&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Sometimes, you want to attach multiple handlers. That's fine, because the logging framework uses Streams, so you just need to use &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;asBroadcastStream()&lt;/code&gt;:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;main() {
  var loggerStream = Logger.root.onRecord.asBroadcastStream();
  // attach the PrintHandler and the File logging handler
  loggerStream.listen(new PrintHandler()); 
  loggerStream.listen(new SyncFileLoggingHandler("myLogFile.txt"));       
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Note&lt;/strong&gt; &lt;em style="border: 0px; font-family: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;At present, the implementations of the client and server handlers are fairly basic, but given time (and your help?), they should get greater functionality. Ideas include: Allowing the x-loggerui to filter based on level.&lt;br /&gt;or creating an async version of the server side logger.&lt;/em&gt;&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Getting more control over the output&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Now you have seen what can be output, let's take a look at how you customize that.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Each of the handlers (&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;LoggerUi&lt;/code&gt;, &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;SyncFileLoggingHandler&lt;/code&gt; and &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;PrintHandler&lt;/code&gt;) implement a&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;BaseLoggingHandler&lt;/code&gt; interface. These have a &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;LogRecordTransformer&lt;/code&gt; instance, that transforms an SDK &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;LogRecord&lt;/code&gt; into some other format.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging_handlers&lt;/code&gt; package contains two transformers that implement&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;LogRecordTransformer&lt;/code&gt;: &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;StringTransformer&lt;/code&gt; and &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;MapTransformer&lt;/code&gt;. All three handlers use a default implementation of a &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;StringTransformer&lt;/code&gt;, but you can pass an alternative transformer into the constructor of both the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;PrintHandler&lt;/code&gt; or &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;SyncFileLoggingHandler&lt;/code&gt;.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;StringTransformer&lt;/strong&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;StringTransformer&lt;/code&gt; lets you control the fields that get output, for example:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;main() {
  var fileHandler = 
      new SyncFileLoggingHandler("logfile.txt", transformer: new StringTransformer("%m"));
  Logger.root.onRecord.listen(fileHandler); // default 
  var myclass = new MyClass(); // from above - outputs log message
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;StringTransformer&lt;/code&gt; allows formatting strings to specify the output. %m is just the message without all the other information, and replicates the print command.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The full list of formatting strings is shown below:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;%p = Outputs LogRecord.level
%m = Outputs LogRecord.message
%n = Outputs the Logger.name
%t = Outputs the timestamp according to the Date Time Format specified
%s = Outputs the logger sequence 
%x = Outputs the exception
%e = Outputs the exception message
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The default formatting strings are shown below (with &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;\t&lt;/code&gt; for tab separation):&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;DEFAULT_MESSAGE_FORMAT = "%t\t%n\t[%p]:\t%m";
DEFAULT_EXCEPTION_FORMAT = "\n%e\n%x";
DEFAULT_DATE_TIME_FORMAT = "yyyy.mm.dd HH:mm:ss.SSS Z";
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
You can customize all of these when you create a logger handler.&lt;/div&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Replacing the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt; command&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Now that you have seen some of the formatting available, let's see how you can actually replace the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;print()&lt;/code&gt; command:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;main() {
  // simulate existing print command by only outputting the message
  Logger.root.onRecord.listen(new PrintHandler(messageFormat:"%m")); 
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Taking control: Logging levels and heirarchical loggers&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Let's suppose that you are using my library.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
We have &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;your_library&lt;/code&gt; and &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;my_library&lt;/code&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
You don't want to see my logging when you test your library.&lt;br /&gt;
How can you control it?&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Let's look at some code that outputs logging from &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;your_library&lt;/code&gt; but not &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;my_library&lt;/code&gt;:&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;import 'package:my_library/my_library.dart'; // don't want to see logging here
import 'your_library.dart';  // Show logging from this library please :)

import 'package:logging/logging.dart'; 
import 'package:logging_handlers/logging_handlers_shared.dart';

main() {
  hierarchicalLoggingEnabled = true; // set this to true - its part of Logging SDK

  // now control the logging.
  // Turn off all logging first
  Logger.root.level = Level.OFF;
  Logger.root.onRecord.listen(new PrintHandler());

  // create a logger for your library 
  // (there will be a single instance for each logger with the same name)
  // and set the level to ALL
  new Logger("your_library")..level = Level.ALL;

  doSomethingInYourLibrary(); // logging is output to console
  doSomethingInMyLibrary(); // logging is not be output      
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Now let's use the hierarchy to use different logging for a specific class (assuming that you have a class logger created for &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;your_library.YourClass&lt;/code&gt;):&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;main() {
  hierarchicalLoggingEnabled = true; // set this to true - its part of Logging SDK

  // now control the logging.
  // Turn off all logging first
  Logger.root.level = Level.OFF;
  Logger.root.onRecord.listen(new PrintHandler());

  // create a logger for your library 
  // (there is only a single instance for each logger with the same name)
  // and set the level to ALL
  new Logger("your_library")..level = Level.INFO;
  new Logger("your_library.YourClass")..level = Level.ALL;

  doSomethingInYourLibrary(); // Only INFO logging is output to console
  new YourClass(); // All logging output to the console
  doSomethingInMyLibrary(); // logging is not be output      
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Quick Reference&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;strong style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Logging best practice&lt;/strong&gt;&lt;/div&gt;
&lt;ol style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px 0px 12px 25px; padding: 0px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Add &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging&lt;/code&gt; and &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging_handlers&lt;/code&gt; to pubspec&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Import the &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;logging&lt;/code&gt; SDK where you want to write log messages&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;import 'package:logging/logging.dart';&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
Create a logger (or loggers), and use them&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
``` final _libraryLogger = new Logger("my_library");&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
doSomething() { _libraryLogger.info("Something is done") }&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
class MyClass { final _classLogger = new Logger("my_library.MyClass")&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
MyClass() { _classLogger.fine("MyClass is constructed"); } } ```&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
When you use your library / class, and want to output some logging, create an instance of a &lt;code style="background-color: #f7f7f9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(225, 225, 232); color: #dd1144; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 2px 4px; vertical-align: baseline; white-space: nowrap;"&gt;LoggingHandler&lt;/code&gt; and attach it to the root logger&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
``` import 'package:logging_handlers/logging_handlers_shared.dart'; import 'your_library';&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
main() { Logger.root.onRecord.listen(new PrintHandler()); } ```&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-variant: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
When you want finer control over what get's output, use hierarchical loggin and set levels&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
``` import 'package:logging_handlers/logging_handlers_shared.dart'; import 'your_library'; import 'package:my_library/my_library.dart';&lt;/div&gt;
&lt;div style="border: 0px; font-style: inherit; font-variant: inherit; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
main() { Logger.root.onRecord.listen(new PrintHandler()); Logger.root.level = Level.OFF; // log nothing by default new Logger("your_library")..level = Level.ALL; // log all in your library&lt;br /&gt;
} ```&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;em style="border: 0px; font-family: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Server handlers are found here:&lt;/em&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;import 'package:logging_handlers/server_logging_handlers.dart';
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;em style="border: 0px; font-family: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Client logging handlers are found here:&lt;/em&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;import 'package:logging_handlers/browser_logging_handlers.dart';
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
&lt;em style="border: 0px; font-family: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Web UI component is here:&lt;/em&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; color: inherit; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;&amp;lt;link rel="import" href="package:logging_handlers/src/client/loggerui.html"&amp;gt;
...
&amp;lt;x-loggerui&amp;gt;&amp;lt;/x-loggerui&amp;gt;

... 
// and in your script, call:
import 'package:logging/logging.dart'; 
import 'package:logging_handlers/browser_logging_handlers.dart';

main() {
  hierarchicalLoggingEnabled = true;
  attachXLoggerUi();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 48px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Caveats&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
The Logger framework (as at M4), has a TODO about logging exceptions. At the moment &lt;em style="border: 0px; font-family: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;it doesn't&lt;/em&gt;. If you want to log exceptions, add the exception text to the log message.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 12px; padding: 0px; vertical-align: baseline;"&gt;
If you find any problems or errors, then please let me know. This was current as at r21823&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=0RZMbDWhAKQ:uAuzx8K4HNg:yIl2AUoC8zA"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=yIl2AUoC8zA" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=0RZMbDWhAKQ:uAuzx8K4HNg:V_sGLiPBpWU"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=0RZMbDWhAKQ:uAuzx8K4HNg:V_sGLiPBpWU" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=0RZMbDWhAKQ:uAuzx8K4HNg:qj6IDK7rITs"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=qj6IDK7rITs" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=0RZMbDWhAKQ:uAuzx8K4HNg:63t7Ie-LG7Y"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=63t7Ie-LG7Y" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=0RZMbDWhAKQ:uAuzx8K4HNg:F7zBnMyn0Lo"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=0RZMbDWhAKQ:uAuzx8K4HNg:F7zBnMyn0Lo" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img height="1" src="http://feeds.feedburner.com/~r/Dartwatch/~4/0RZMbDWhAKQ" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/8rFYBG6BHpE" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 07 May 2013 19:17:08 +0000</pubDate>
	<author>noreply@blogger.com (Chris Buckett)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/Dartwatch/~3/0RZMbDWhAKQ/campaign-to-use-real-logging-instead-of.html</feedburner:origLink></item>
<item>
	<title>Dartcasts.com: Episode 14: Futures</title>
	<guid isPermaLink="false">http://dartcasts.com/post/49767051962</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/bzhjWbFZkqg/49767051962</link>
	<description>&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h1&gt;Episode 14: Futures&lt;/h1&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/bzhjWbFZkqg" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 06 May 2013 11:05:00 +0000</pubDate>
<feedburner:origLink>http://dartcasts.com/post/49767051962</feedburner:origLink></item>
<item>
	<title>Dartwatch: Try out Dart in your browser at http://trydart.dartwatch.com</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8928104154571388295.post-6039751134428374626</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/O7SyAA3AXDc/try-out-dart-in-your-browser-at.html</link>
	<description>Now you can try out Dart code snippets in your browser at &lt;a href="http://trydart.dartwatch.com/"&gt;http://trydart.dartwatch.com&lt;/a&gt;.&lt;br /&gt;
&lt;h3&gt;
 Features: &lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt; Link to a shortcode of your Dart snippets &lt;/li&gt;
&lt;li&gt; Embed runnable snippets in your blogs (like below).&lt;/li&gt;
&lt;/ul&gt;


&lt;br /&gt;
&lt;div&gt;
At the moment it doesn't support pub packages, dart:io, dart:html, so it's only for trying out dart language snippets.

Let me know if you use it, (or if you manage to break it :).&lt;/div&gt;
&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=jv7VTYwn5a4:KOmxTh_oNvg:yIl2AUoC8zA"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=yIl2AUoC8zA" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=jv7VTYwn5a4:KOmxTh_oNvg:V_sGLiPBpWU"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=jv7VTYwn5a4:KOmxTh_oNvg:V_sGLiPBpWU" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=jv7VTYwn5a4:KOmxTh_oNvg:qj6IDK7rITs"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=qj6IDK7rITs" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=jv7VTYwn5a4:KOmxTh_oNvg:63t7Ie-LG7Y"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?d=63t7Ie-LG7Y" /&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Dartwatch?a=jv7VTYwn5a4:KOmxTh_oNvg:F7zBnMyn0Lo"&gt;&lt;img border="0" src="http://feeds.feedburner.com/~ff/Dartwatch?i=jv7VTYwn5a4:KOmxTh_oNvg:F7zBnMyn0Lo" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img height="1" src="http://feeds.feedburner.com/~r/Dartwatch/~4/jv7VTYwn5a4" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/O7SyAA3AXDc" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 30 Apr 2013 11:35:56 +0000</pubDate>
	<author>noreply@blogger.com (Chris Buckett)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/Dartwatch/~3/jv7VTYwn5a4/try-out-dart-in-your-browser-at.html</feedburner:origLink></item>
<item>
	<title>Seth Ladd: Lazy Load Libraries in Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8601579266012455634.post-5986305417236804047</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/0y1dNtQaE34/lazy-load-libraries-in-dart.html</link>
	<description>Dart is a statically analyzable language, and its tree-shaking compiler does a good job of eliminating dead code and producing a single, optimized application file. However, sometimes developers need to control when certain libraries are loaded and thus need to control which libraries are included in the main application file. To help, the dart2js compiler, which converts Dart code into JavaScript code, now supports lazy-loaded libraries.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-mt92rQOSk_Q/UXdx0aKXAfI/AAAAAAAAV1Y/zCqHR0Le-hc/s1600/87885327_b0db9347cf.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-mt92rQOSk_Q/UXdx0aKXAfI/AAAAAAAAV1Y/zCqHR0Le-hc/s1600/87885327_b0db9347cf.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;Lazy Load&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
As an example, consider an application that has many different screens. Some screens are more obscure than others, and aren't required for the application to start. A developer should be able to say "I don't need these screens now, but pull them in when I do need them." This lazy-loading is a common deployment strategy for web apps, because small initial loads means faster application startup.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can mark a library as "lazy", and the dart2js compiler will output a separate JavaScript file for that library. Note that dart2js still performs tree shaking (aka dead code elimination) across the entire app (technically, across the entire isolate). This means that only the functionality required from the lazy-loaded library will actually be compiled into the separate file.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The lazy-loaded library is still part of the application structure, and must exist and be available to dart2js when the program is compiled. This is not "dynamic loading", per se, because the application must statically import all libraries (lazy or not).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
(Note: as of the time of this writing, dart2js emits at most one other JavaScript file. This restriction will be removed and you will be able to emit multiple files for a single application. Please track &lt;a href="https://code.google.com/p/dart/issues/detail?id=3940"&gt;Dartbug 3940&lt;/a&gt; to learn more.)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: large;"&gt;DeferredLibrary Example&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The main application can mark a library with an @lazy metadata. Then, it declares an instance of &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_async/DeferredLibrary.html"&gt;DeferredLibrary&lt;/a&gt; that points to the outputted JavaScript file.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;import &lt;/span&gt;'dart:html'&lt;span class="s1"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;import &lt;/span&gt;'dart:async'&lt;span class="s1"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;@lazy&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;import &lt;/span&gt;'reverser.dart'&lt;span class="s1"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s2"&gt;const&lt;/span&gt; lazy = &lt;span class="s2"&gt;const&lt;/span&gt; DeferredLibrary(&lt;span class="s3"&gt;'reverser'&lt;/span&gt;, uri: &lt;span class="s3"&gt;'./part.js'&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s2"&gt;void&lt;/span&gt; main() {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  lazy.load().then((_) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;    print(&lt;/span&gt;'library loaded'&lt;span class="s1"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;    query(&lt;/span&gt;"#sample_text_id"&lt;span class="s1"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;      ..text = &lt;span class="s3"&gt;"Click me!"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;      ..onClick.listen(reverseText);&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  });&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s2"&gt;void&lt;/span&gt; reverseText(MouseEvent event) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  query(&lt;span class="s3"&gt;"#sample_text_id"&lt;/span&gt;).text =&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;      reverse(query(&lt;span class="s3"&gt;"#sample_text_id"&lt;/span&gt;).text);&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
Notice how the library doesn't come into existence until after the Future from &lt;span style="font-family: Courier New, Courier, monospace;"&gt;lazy.load()&lt;/span&gt; completes. Only then can you call into the library.&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
The runtime throws NoSuchMethodError if you try to access functionality from a library that it not yet loaded.&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-size: large;"&gt;More to come&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
The lazy-load functionality of dart2js is just the beginning. In the future, you will be able to mark multiple libraries as "lazy", and really control how you deploy and load your web application.&lt;br /&gt;
&lt;br /&gt;
Also, this functionality only currently works with dart2js. Please star &lt;a href="https://code.google.com/p/dart/issues/detail?id=10171"&gt;Dartbug 10171&lt;/a&gt; if you are interested in seeing the same lazy-loading for the VM and Dartium.&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
Please try this out, we look forward to your feedback!&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
(Photo Credit: &lt;a href="http://www.flickr.com/photos/87603889@N00/87885327/"&gt;Marcus Hansson&lt;/a&gt; licensed under &lt;a href="http://creativecommons.org/licenses/by/2.0/"&gt;cc&lt;/a&gt;)&lt;img height="1" src="http://feeds.feedburner.com/~r/SethLaddsBlog/~4/EhU7euhpr50" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/0y1dNtQaE34" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 24 Apr 2013 05:47:00 +0000</pubDate>
	<author>noreply@blogger.com (Seth Ladd)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/SethLaddsBlog/~3/EhU7euhpr50/lazy-load-libraries-in-dart.html</feedburner:origLink></item>
<item>
	<title>Seth Ladd: Dynamically Load Code with Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8601579266012455634.post-1421143591573065874</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/NolCJT9-YgA/dynamically-load-code-with-dart.html</link>
	<description>Rejoice! Dartium, a build of Chromium with the Dart VM, can now spawn a new isolate from a URI. This means your Dart apps have a new option for more modular code.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Isolates&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In Dart, an &lt;i&gt;isolate&lt;/i&gt; is an abstraction for an "isolated memory heap". Isolates do not share memory (variables, statics, etc), they are essentially self-contained applications. Isolates communicate by sending and receiving messages over &lt;i&gt;ports&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-lKoB2jUTX6U/UXdS8wuphdI/AAAAAAAAV1I/Jf78_URD_Fc/s1600/Dart+isolates+diagram+(1).png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-lKoB2jUTX6U/UXdS8wuphdI/AAAAAAAAV1I/Jf78_URD_Fc/s1600/Dart+isolates+diagram+(1).png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Why Isolates Matter&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Dart programs are static, in that their shape and structure do not change after they are compiled. A static program is great for optimizations like tree shaking (aka dead code elimination), type-inferencing compilers, and more.&lt;br /&gt;
&lt;br /&gt;
However, modular apps often require a way to dynamically load code. Configurable and modular apps need a way to, at run time, pull in new functionality. If Dart apps have a static structure, how can they dynamically alter their behavior?&lt;br /&gt;
&lt;br /&gt;
Isolates to the rescue! The structure inside of an isolate is static, but a Dart program is free to dynamically load other isolates. This means that libraries can be loaded into isolates at run time.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Your First Isolate&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This simple &lt;i&gt;reverser&lt;/i&gt; isolate listens on its port, receives messages, reverses them, and send the reversed text back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;// reverser.dart&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;import&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;'dart:isolate'&lt;span class="s2"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s3"&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;span class="s4"&gt;port&lt;/span&gt;.receive((msg, SendPort replyTo) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    &lt;span class="s1"&gt;var&lt;/span&gt; reverse = msg &lt;span class="s1"&gt;as&lt;/span&gt; String;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    &lt;span class="s1"&gt;var&lt;/span&gt; buffer = &lt;span class="s1"&gt;new&lt;/span&gt; StringBuffer();&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    &lt;span class="s1"&gt;for&lt;/span&gt; (&lt;span class="s1"&gt;var&lt;/span&gt; i = reverse.&lt;span class="s4"&gt;length&lt;/span&gt; - &lt;span class="s5"&gt;1&lt;/span&gt;; i &amp;gt;= &lt;span class="s5"&gt;0&lt;/span&gt;; i--) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;      buffer.write(reverse[i]);&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    }&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    replyTo.send(buffer.toString());&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  });&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
The main application (which itself is an isolate), is responsible for instantiating the reverser isolate. Use the &lt;span style="font-family: Courier New, Courier, monospace;"&gt;spawnUri()&lt;/span&gt; function from &lt;span style="font-family: Courier New, Courier, monospace;"&gt;dart:isolate&lt;/span&gt; to spawn a new isolate from some file.&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;// main.dart&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;SendPort &lt;span class="s1"&gt;reverser&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s2"&gt;void&lt;/span&gt; &lt;span class="s3"&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s4"&gt;  query(&lt;/span&gt;"#sample_text_id"&lt;span class="s4"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p3"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s4"&gt;    ..&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="s4"&gt; = &lt;/span&gt;"Click me!"&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    ..&lt;span class="s1"&gt;onClick&lt;/span&gt;.listen(reverseText);&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;span class="s2"&gt;var&lt;/span&gt; serviceFile = &lt;span class="s5"&gt;'reverser.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class="p4"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s4"&gt;  &lt;/span&gt;&lt;span class="s2"&gt;if&lt;/span&gt;&lt;span class="s4"&gt; (identical(&lt;/span&gt;&lt;span class="s6"&gt;1&lt;/span&gt;&lt;span class="s4"&gt;, &lt;/span&gt;&lt;span class="s6"&gt;1.0&lt;/span&gt;&lt;span class="s4"&gt;)) {  &lt;/span&gt;// &lt;span class="s7"&gt;XXX&lt;/span&gt;: horrible hack to detect if we're in JS&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    serviceFile = &lt;span class="s5"&gt;'reverser.dart.js'&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  }&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;span class="s1"&gt;reverser&lt;/span&gt; = spawnUri(serviceFile);&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
Notice the horrible hack to detect if this code is running in the Dart VM or JavaScript. I don't know a better way to do it, but I don't recommend this.&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p2"&gt;
When the text from #sample_text_id is clicked, the reverseText function is run:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;span class="s1"&gt;void&lt;/span&gt; &lt;span class="s2"&gt;reverseText&lt;/span&gt;(MouseEvent event) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;span class="s1"&gt;var&lt;/span&gt; text = query(&lt;span class="s3"&gt;"#sample_text_id"&lt;/span&gt;).&lt;span class="s4"&gt;text&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  &lt;span class="s4"&gt;reverser&lt;/span&gt;.call(text).then((reversed) {&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;    query(&lt;span class="s3"&gt;"#sample_text_id"&lt;/span&gt;).&lt;span class="s4"&gt;text&lt;/span&gt; = reversed;&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;  });&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
Notice how the reverser isolate is sent a message via call(), which returns a Future. When the Future completes, the callback registered with then() is run.&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;span style="font-size: large;"&gt;Support&lt;/span&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
Dartium supports spawnUri since at least version 28.0.1478.0 (194114). Dart2js compiles spawnUri() into a Web worker.&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
Note that each isolate is its own app, so dart2js must compile the same bootstrap code into each isolate file.&lt;/div&gt;
&lt;/div&gt;
&lt;img height="1" src="http://feeds.feedburner.com/~r/SethLaddsBlog/~4/crw8ORXbGME" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/NolCJT9-YgA" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 24 Apr 2013 04:17:00 +0000</pubDate>
	<author>noreply@blogger.com (Seth Ladd)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/SethLaddsBlog/~3/crw8ORXbGME/dynamically-load-code-with-dart.html</feedburner:origLink></item>
<item>
	<title>Dartcasts.com: Episode 13: Method Cascades</title>
	<guid isPermaLink="false">http://dartcasts.com/post/48604441996</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/BqHR0i2BZ2o/48604441996</link>
	<description>&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h1&gt;Episode 13: Method Cascades&lt;/h1&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/BqHR0i2BZ2o" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 22 Apr 2013 10:37:00 +0000</pubDate>
<feedburner:origLink>http://dartcasts.com/post/48604441996</feedburner:origLink></item>
<item>
	<title>Seth Ladd: 6 Dart FAQs - Answered!</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-8601579266012455634.post-4428229519982379724</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/A6Q9K5vjJb8/6-dart-faqs-answered.html</link>
	<description>&lt;a href="https://plus.google.com/105922896126183852742"&gt;Calvin Prewitt&lt;/a&gt; wrote some good &lt;a href="https://plus.google.com/u/0/+SethLadd/posts/25HSRX13wUh"&gt;questions about Dart&lt;/a&gt; via G+. It might be hard to find his questions and my answers, so I hoisted them here. Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Q) Could you also detail compatibility and which JavaScript APIs are fully or partially supported for Dart2JS production code?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A) All JavaScript APIs supported by Chrome should be available to Dart. See &lt;a href="http://www.dartlang.org/articles/improving-the-dom/"&gt;http://www.dartlang.org/articles/improving-the-dom/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Q) It appears Dart is aiming to eventually replace it? The FAQ says it only targets modern browser versions.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A) Dart's aim is to give developers like you a very productive experience, and give your users a very fast experience. Dart targets IE9+, plus the modern versions of Firefox, Chrome, Safari, mobile safari, and Chrome for Android. Basically, modern browsers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Q) Is there a way to have fine grained control over the JS code like in Closure?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A) Dart2js can emit a single file, plus up to one other lazily loaded library. In the future, we want to give you more control. Here's the bug: &lt;a href="https://code.google.com/p/dart/issues/detail?id=10023"&gt;https://code.google.com/p/dart/issues/detail?id=10023&lt;/a&gt; Please note, dart2js's output is already smaller thanks to tree-shaking.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Q) I've noticed a lot of similarities to Closure Library. Has some or all of the Closure Library code been ported?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A) I'm unaware of an "official" port from the closure libraries. In general, though, you shouldn't need it. Dart's core libraries are pretty comprehensive. Check out &lt;a href="http://api.dartlang.org/"&gt;http://api.dartlang.org&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Q) Is Dart ready for production use? Specifically for generating JS code. If not, what's missing or where are the sore spots?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A) Dart's M4 release just came out, promising no more breaking changes to the core libs. Hurray! There's still work to do, but the platform just got much more stable. If you see something missing, let us know: &lt;a href="http://dartbug.com/new"&gt;http://dartbug.com/new&lt;/a&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Q) Finally, where can I help? Closure is nowhere near a productive environment. If Dart is aiming to make building complex web apps easier than working with Closure, I'd like to contribute to that goal.﻿&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;A) Yes, we're "aiming to hit a productivity and performance bullseye" (groan :) We'd love help. Dart is open source, so check out &lt;a href="http://dartbug.com/"&gt;http://dartbug.com/&lt;/a&gt; and out Github presence at&lt;a href="http://github.com/dart-lang"&gt;http://github.com/dart-lang&lt;/a&gt; Join our Dartisans community in G+, too&lt;/div&gt;
&lt;img height="1" src="http://feeds.feedburner.com/~r/SethLaddsBlog/~4/RS18MB1Az9M" width="1" /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/A6Q9K5vjJb8" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 18 Apr 2013 20:09:00 +0000</pubDate>
	<author>noreply@blogger.com (Seth Ladd)</author>
<feedburner:origLink>http://feedproxy.google.com/~r/SethLaddsBlog/~3/RS18MB1Az9M/6-dart-faqs-answered.html</feedburner:origLink></item>
<item>
	<title>Adam Coding @ Github: gplus quickstart with dart</title>
	<guid isPermaLink="false">http://financeCoding.github.com/blog/2013/04/02/gplus-quickstart-with-dart</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/PRFKn5FK5zU/</link>
	<description>&lt;p&gt;Tonights mash-up was taking the &lt;a href="https://github.com/Scarygami/gplus-quickstart-dart"&gt;gplus-quickstart-dart&lt;/a&gt; and wiring it up for server side support. Similar to the &lt;a href="https://github.com/googleplus/gplus-quickstart-java"&gt;gplus-quickstart-java&lt;/a&gt;, the client will use the &lt;a href="https://developers.google.com/+/web/+1button/"&gt;gplus login button&lt;/a&gt; to do the &lt;a href="https://developers.google.com/accounts/docs/OAuth2WebServer"&gt;OAuth2WebServer&lt;/a&gt; flow and send the code over to the server. The server can then verify and make calls on behalf of the client since an ‘offline’ token was requested. This demo just features the server side and what was used to put it together. &lt;a href="https://plus.google.com/u/0/109130932502535286138/"&gt;Yulian Kuncheff&lt;/a&gt; has been the primary developer behind &lt;a href="https://github.com/Daegalus/fukiya"&gt;fukiya&lt;/a&gt; which is an express like framework for dart. The thing I liked most about &lt;a href="https://github.com/Daegalus/fukiya"&gt;fukiya&lt;/a&gt; was how simple and easy it was to setup URL handlers.&lt;/p&gt;

&lt;p&gt;First off, setting up some dependencies.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class=""&gt;&lt;span class="line"&gt;dependencies:
&lt;/span&gt;&lt;span class="line"&gt;  google_plus_v1_api: any
&lt;/span&gt;&lt;span class="line"&gt;  browser: any
&lt;/span&gt;&lt;span class="line"&gt;  fukiya: '&amp;gt;=0.0.11'
&lt;/span&gt;&lt;span class="line"&gt;  html5lib: "&amp;gt;=0.4.1 &amp;lt;0.4.2"
&lt;/span&gt;&lt;span class="line"&gt;  logging: "&amp;gt;=0.4.3+5"&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;A quick outline of what URLs fukiya handles. Dead simple to setup!&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Fukiya&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;getIndexHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/index.html'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;getIndexHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/index'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;getIndexHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/connect'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;postConnectDataHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/people'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;getPeopleHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/disconnect'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;postDisconnectHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;staticFiles&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'./web'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;FukiyaJsonParser&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'127.0.0.1'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3333&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;The index handler is special cause we needed to inject a state token into the page and HTTP session. The state token is then verified on the &lt;code&gt;/connect&lt;/code&gt; post. The one-time token helps avoid any &lt;a href="http://en.wikipedia.org/wiki/Confused_deputy_problem"&gt;Confused_deputy_problem&lt;/a&gt;s.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;span class="line-number"&gt;14&lt;/span&gt;
&lt;span class="line-number"&gt;15&lt;/span&gt;
&lt;span class="line-number"&gt;16&lt;/span&gt;
&lt;span class="line-number"&gt;17&lt;/span&gt;
&lt;span class="line-number"&gt;18&lt;/span&gt;
&lt;span class="line-number"&gt;19&lt;/span&gt;
&lt;span class="line-number"&gt;20&lt;/span&gt;
&lt;span class="line-number"&gt;21&lt;/span&gt;
&lt;span class="line-number"&gt;22&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;getIndexHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FukiyaContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// Create a state token. &lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_createStateToken&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// Readin the index file and add state token into the meta element. &lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;INDEX_HTML&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;readAsString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;indexDocument&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;Document&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;indexDocument&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;Element&lt;/span&gt; &lt;span class="n"&gt;metaState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'&amp;lt;meta name="state_token" content="&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;"&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;children&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;metaState&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;writeBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outerHtml&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;codeUnits&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;catchError&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;serverLogger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"File Response error: &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nl"&gt;onError:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;serverLogger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"error = &lt;/span&gt;&lt;span class="si"&gt;$&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;statusCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;404&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;On the &lt;code&gt;/connect&lt;/code&gt; post we will expect a gplus id to be passed to the query parameters and some token data posted. We can then verify the state token and use the token data for accessing the Google APIs.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;span class="line-number"&gt;14&lt;/span&gt;
&lt;span class="line-number"&gt;15&lt;/span&gt;
&lt;span class="line-number"&gt;16&lt;/span&gt;
&lt;span class="line-number"&gt;17&lt;/span&gt;
&lt;span class="line-number"&gt;18&lt;/span&gt;
&lt;span class="line-number"&gt;19&lt;/span&gt;
&lt;span class="line-number"&gt;20&lt;/span&gt;
&lt;span class="line-number"&gt;21&lt;/span&gt;
&lt;span class="line-number"&gt;22&lt;/span&gt;
&lt;span class="line-number"&gt;23&lt;/span&gt;
&lt;span class="line-number"&gt;24&lt;/span&gt;
&lt;span class="line-number"&gt;25&lt;/span&gt;
&lt;span class="line-number"&gt;26&lt;/span&gt;
&lt;span class="line-number"&gt;27&lt;/span&gt;
&lt;span class="line-number"&gt;28&lt;/span&gt;
&lt;span class="line-number"&gt;29&lt;/span&gt;
&lt;span class="line-number"&gt;30&lt;/span&gt;
&lt;span class="line-number"&gt;31&lt;/span&gt;
&lt;span class="line-number"&gt;32&lt;/span&gt;
&lt;span class="line-number"&gt;33&lt;/span&gt;
&lt;span class="line-number"&gt;34&lt;/span&gt;
&lt;span class="line-number"&gt;35&lt;/span&gt;
&lt;span class="line-number"&gt;36&lt;/span&gt;
&lt;span class="line-number"&gt;37&lt;/span&gt;
&lt;span class="line-number"&gt;38&lt;/span&gt;
&lt;span class="line-number"&gt;39&lt;/span&gt;
&lt;span class="line-number"&gt;40&lt;/span&gt;
&lt;span class="line-number"&gt;41&lt;/span&gt;
&lt;span class="line-number"&gt;42&lt;/span&gt;
&lt;span class="line-number"&gt;43&lt;/span&gt;
&lt;span class="line-number"&gt;44&lt;/span&gt;
&lt;span class="line-number"&gt;45&lt;/span&gt;
&lt;span class="line-number"&gt;46&lt;/span&gt;
&lt;span class="line-number"&gt;47&lt;/span&gt;
&lt;span class="line-number"&gt;48&lt;/span&gt;
&lt;span class="line-number"&gt;49&lt;/span&gt;
&lt;span class="line-number"&gt;50&lt;/span&gt;
&lt;span class="line-number"&gt;51&lt;/span&gt;
&lt;span class="line-number"&gt;52&lt;/span&gt;
&lt;span class="line-number"&gt;53&lt;/span&gt;
&lt;span class="line-number"&gt;54&lt;/span&gt;
&lt;span class="line-number"&gt;55&lt;/span&gt;
&lt;span class="line-number"&gt;56&lt;/span&gt;
&lt;span class="line-number"&gt;57&lt;/span&gt;
&lt;span class="line-number"&gt;58&lt;/span&gt;
&lt;span class="line-number"&gt;59&lt;/span&gt;
&lt;span class="line-number"&gt;60&lt;/span&gt;
&lt;span class="line-number"&gt;61&lt;/span&gt;
&lt;span class="line-number"&gt;62&lt;/span&gt;
&lt;span class="line-number"&gt;63&lt;/span&gt;
&lt;span class="line-number"&gt;64&lt;/span&gt;
&lt;span class="line-number"&gt;65&lt;/span&gt;
&lt;span class="line-number"&gt;66&lt;/span&gt;
&lt;span class="line-number"&gt;67&lt;/span&gt;
&lt;span class="line-number"&gt;68&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;postConnectDataHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FukiyaContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;serverLogger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"postConnectDataHandler"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;tokenData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// TODO: handle missing token&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;stateToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;queryStateToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;queryParameters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;queryParameters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// Check if the token already exists for this session. &lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenData&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Current user is already connected."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// Check if any of the needed token values are null or mismatched.&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stateToken&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;queryStateToken&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;stateToken&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;queryStateToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;statusCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;401&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Invalid state parameter."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// Normally the state would be a one-time use token, however in our&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// simple case, we want a user to be able to connect and disconnect&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// without reloading the page.  Thus, for demonstration, we don't&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// implement this best practice.&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;gPlusId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;queryParameters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"gplus_id"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="n"&gt;Buffer&lt;/span&gt; &lt;span class="n"&gt;sb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="n"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="c1"&gt;// Read data from request.&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="n"&gt;Decoder&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nl"&gt;onDone:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;serverLogger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"context.request.listen.onDone = &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;Map&lt;/span&gt; &lt;span class="n"&gt;requestData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;Map&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;              &lt;span class="s2"&gt;"grant_type"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"authorization_code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;              &lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;requestData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;              &lt;span class="c1"&gt;// http://www.riskcompletefailure.com/2013/03/postmessage-oauth-20.html&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;              &lt;span class="s2"&gt;"redirect_uri"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"postmessage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;              &lt;span class="s2"&gt;"client_id"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CLIENT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;              &lt;span class="s2"&gt;"client_secret"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;CLIENT_SECRET&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Client&lt;/span&gt; &lt;span class="n"&gt;_httpClient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;_httpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TOKEN_ENDPOINT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;fields:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="c1"&gt;// At this point we have the token and refresh token.&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;credentials&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="n"&gt;_httpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;verifyTokenUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;TOKENINFO_URL&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;?access_token=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;verifyTokenUrl&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="n"&gt;serverLogger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"response = &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;verifyResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;userId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;verifyResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;verifyResponse&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"user_id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;accessToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;userId&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;userId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;gPlusId&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;accessToken&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;          &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;          &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"POST OK"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;          &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;statusCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;401&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;          &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"POST FAILED &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;userId&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; != &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;gPlusId&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;        &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Now the HTTP session has the full ability to make calls on behalf of the user. The &lt;code&gt;/people&lt;/code&gt; method will be called from the client to retrieve the list of visible friends of that user.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;getPeopleHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FukiyaContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;accessToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;SimpleOAuth2&lt;/span&gt; &lt;span class="n"&gt;simpleOAuth2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;SimpleOAuth2&lt;/span&gt;&lt;span class="p"&gt;()..&lt;/span&gt;&lt;span class="n"&gt;credentials&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;console_auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Credentials&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Plus&lt;/span&gt; &lt;span class="n"&gt;plusclient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Plus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;simpleOAuth2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;plusclient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;makeAuthRequests&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;plusclient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;people&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"me"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"visible"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;plus&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PeopleFeed&lt;/span&gt; &lt;span class="n"&gt;people&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;serverLogger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/people = &lt;/span&gt;&lt;span class="si"&gt;$&lt;/span&gt;&lt;span class="n"&gt;people&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;people&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;The final responsibility we can bestow upon the server is allowing the client to disconnect by revoking OAuth access.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;span class="line-number"&gt;14&lt;/span&gt;
&lt;span class="line-number"&gt;15&lt;/span&gt;
&lt;span class="line-number"&gt;16&lt;/span&gt;
&lt;span class="line-number"&gt;17&lt;/span&gt;
&lt;span class="line-number"&gt;18&lt;/span&gt;
&lt;span class="line-number"&gt;19&lt;/span&gt;
&lt;span class="line-number"&gt;20&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;postDisconnectHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;FukiyaContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;tokenData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenData&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;statusCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;401&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Current user not connected."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;revokeTokenUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;TOKEN_REVOKE_ENDPOINT&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;?token=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="n"&gt;tokenData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"access_token"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;()..&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;revokeTokenUrl&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Response&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_createStateToken&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;Map&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;                &lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"state_token"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;                &lt;span class="s2"&gt;"message"&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Successfully disconnected."&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;                &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Thats about it, Happy Dart Hacking! Special thanks to &lt;a href="https://plus.google.com/112336147904981294875"&gt;Gerwin Sturm&lt;/a&gt; for putting together the original example for client side. Full source code can be found at &lt;a href="https://github.com/Scarygami/gplus-quickstart-dart"&gt;gplus-quickstart-dart&lt;/a&gt; in the server folder. Please replace your own keys cause mine will be removed at some point.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/PRFKn5FK5zU" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 03 Apr 2013 02:25:00 +0000</pubDate>
<feedburner:origLink>http://financeCoding.github.com/blog/2013/04/02/gplus-quickstart-with-dart/</feedburner:origLink></item>
<item>
	<title>Dartcasts.com: Episode 12: Mixins

Learn More

Mixins in Dart
Mixin-based...</title>
	<guid isPermaLink="false">http://dartcasts.com/post/46839085272</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/uKWXh0oQcpU/46839085272</link>
	<description>&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;h1&gt;Episode 12: Mixins&lt;/h1&gt;

&lt;h3&gt;Learn More&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.dartlang.org/articles/mixins/"&gt;Mixins in Dart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.bracha.org/oopsla90.pdf"&gt;Mixin-based Inheritance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/uKWXh0oQcpU" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 01 Apr 2013 10:58:00 +0000</pubDate>
<feedburner:origLink>http://dartcasts.com/post/46839085272</feedburner:origLink></item>
<item>
	<title>Adam Coding @ Github: Dart Multi Touch Canvas With Realtime APIs</title>
	<guid isPermaLink="false">http://financeCoding.github.com/blog/2013/03/21/dart-multi-touch-canvas-with-realtime-apis</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/BtG5Ib1YNWs/</link>
	<description>&lt;p&gt;&lt;a href="https://developers.google.com/drive/"&gt;Google&lt;/a&gt; has made the &lt;a href="https://developers.google.com/drive/realtime/"&gt;realtime&lt;/a&gt; api available for developers. Realtime api provides &lt;a href="http://en.wikipedia.org/wiki/Operational_transformation"&gt;operational transformation&lt;/a&gt; on &lt;a href="https://developers.google.com/drive/realtime/reference/gapi.drive.realtime.CollaborativeString"&gt;strings&lt;/a&gt;, &lt;a href="https://developers.google.com/drive/realtime/reference/gapi.drive.realtime.CollaborativeList"&gt;lists&lt;/a&gt;, &lt;a href="https://developers.google.com/drive/realtime/reference/gapi.drive.realtime.CollaborativeMap"&gt;maps&lt;/a&gt; and custom &lt;a href="https://developers.google.com/drive/realtime/reference/gapi.drive.realtime.CollaborativeObject"&gt;objects&lt;/a&gt;. The application data gets stored on Google Drive and is available from any supported browser. This is going to be the tooling of the future for collaborative applications.&lt;/p&gt;

&lt;p&gt;I took some time to see what it would take for implementing a sample realtime application in dart. Also wanted to make sure my sample could run on mobile chrome.&lt;/p&gt;

&lt;p&gt;Since realtime api is new, dart bindings don’t really exist. Lucky for us we have &lt;a href="http://pub.dartlang.org/packages/js"&gt;js-interop&lt;/a&gt; library. The &lt;a href="http://pub.dartlang.org/packages/js"&gt;js-interop&lt;/a&gt; library provides communications to existing javascript code from dart. I consider this mostly a quick hack to get started with the realtime api until a more native interface exists.&lt;/p&gt;

&lt;p&gt;The sample &lt;a href="http://financecoding.github.com/realtime_touch_canvas/web/index.html"&gt;realtime_touch_canvas&lt;/a&gt; demonstrates a multi touch canvas surface that updates in realtime with all clients that have the application open.&lt;/p&gt;




&lt;p&gt;Most of the heavy lifting is done by &lt;a href="https://github.com/financeCoding/realtime_touch_canvas"&gt;&lt;code&gt;rtclient.dart&lt;/code&gt;&lt;/a&gt;. I ported the &lt;a href="https://github.com/googledrive/realtime-playground/blob/master/js/realtime-client-utils.js"&gt;code&lt;/a&gt; from the javascript version. Its enough code to get started right away but a more structured solution should be done. The main class is &lt;code&gt;RealTimeLoader&lt;/code&gt; used for realtime loading.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;rtl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;RealTimeLoader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;clientId:&lt;/span&gt; &lt;span class="s1"&gt;'CLIENTID.apps.googleusercontent.com'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;apiKey:&lt;/span&gt; &lt;span class="s1"&gt;'KEY'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;rtl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;isComplete&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="cm"&gt;/* RealTimeLoader has authenticated the application and is ready to load a file */&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;loadRealTimeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onFileLoaded&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;initializeModel&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;&lt;code&gt;model.onFileLoaded&lt;/code&gt; and &lt;code&gt;model.initializeModel&lt;/code&gt; handle the creating of model data and loading of model data.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="http://financecoding.github.com/realtime_touch_canvas/web/index.html"&gt;realtime_touch_canvas&lt;/a&gt;, model data was a simple list of json strings. The ticky part here is you need to remember that your working with the realtime api within the javascript vm. So an array needs to be allocated from &lt;a href="http://pub.dartlang.org/packages/js"&gt;js-interop&lt;/a&gt;.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;_createNewModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Proxy&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createList&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_defaultLines&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getRoot&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_linesName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;After the model is created we then get called to load the file. Loading the file for our purposes is binding the collaborative objects. Some tricky things to note here is we are retaining the javascript objects so we can access them after exit of the callback. Also the callbacks have to be wrapped within &lt;a href="http://pub.dartlang.org/packages/js"&gt;js-interop&lt;/a&gt; &lt;code&gt;js.Callback.many&lt;/code&gt; proxy object. The callbacks &lt;code&gt;_linesOnAddValuesChangedEvent&lt;/code&gt; and &lt;code&gt;_linesOnRemovedValuesChangedEvent&lt;/code&gt; are fired off when the collaborative list object has items added or removed.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Proxy&lt;/span&gt; &lt;span class="n"&gt;_doc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;_linesName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"lines"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Proxy&lt;/span&gt; &lt;span class="n"&gt;_lines&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;_bindModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Proxy&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;_doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;retain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_doc&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;_lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getModel&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;getRoot&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_linesName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;_lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gapi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;realtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EventType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;VALUES_ADDED&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Callback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;many&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_linesOnAddValuesChangedEvent&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;_lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gapi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drive&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;realtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EventType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;VALUES_REMOVED&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Callback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;many&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_linesOnRemovedValuesChangedEvent&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;retain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_lines&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;When the callback is called the data would be in the javascript virtual machine so we can parse it and store in our native dart code. This is more of a convenience then a must do, that way we can expose plan old dart objects to our other parts of the dart application.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;_linesOnAddValuesChangedEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;addedValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;insertedLine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;addedValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fromJson&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;insertedLine&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;realtimeTouchCanvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;move&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;moveX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;moveY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Now when we want to store a line in the application we simply convert it to json and push it into the collaborative list. The little tick here is to make sure we are &lt;code&gt;scoped&lt;/code&gt; when accessing the &lt;code&gt;_lines&lt;/code&gt; object since it lives in the javascript virtual machine.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;addLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Line&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scoped&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;      &lt;span class="n"&gt;_lines&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;toJson&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;The &lt;a href="http://financecoding.github.com/realtime_touch_canvas/web/index.html"&gt;realtime_touch_canvas&lt;/a&gt; is live on github gh-pages and &lt;a href="https://github.com/financeCoding/realtime_touch_canvas"&gt;realtime_touch_canvas source&lt;/a&gt; is available.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/BtG5Ib1YNWs" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 22 Mar 2013 01:19:00 +0000</pubDate>
<feedburner:origLink>http://financeCoding.github.com/blog/2013/03/21/dart-multi-touch-canvas-with-realtime-apis/</feedburner:origLink></item>
<item>
	<title>Shannon -jj Behrens: Irrduino: A Sprinkler System Built Using Arduino, Android, Google App Engine, Python, and Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-11788780.post-487180193268299449</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/XQBzLaC5pGE/irrduino-sprinkler-system-built-using.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;&lt;i&gt;Cross-posted from &lt;a href="http://news.dartlang.org/2013/03/irrduino-sprinkler-system-built-using.html"&gt;Dart News &amp;amp; Updates&lt;/a&gt;&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-RfJ9ONyUq-Y/UUH7KZ7ExqI/AAAAAAAABu8/jEGTdjkal34/s1600/Screen+Shot+2013-03-14+at+9.29.37+AM.png"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-RfJ9ONyUq-Y/UUH7KZ7ExqI/AAAAAAAABu8/jEGTdjkal34/s320/Screen+Shot+2013-03-14+at+9.29.37+AM.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Developers frequently ask me if Dart is ready for the real world. Well, of course, that depends on the application. Check out this &lt;a href="http://www.youtube.com/watch?v=YQrEEfltWFE"&gt;short video&lt;/a&gt; in which Joe Fernandez and I not only show that Dart can be used in the real world, we also show that it can be used to take the tedium out of watering your lawn! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Dart code for Lawnville was originally written in January of 2012, a mere three months after Dart was launched as a "technology preview". That was six months before Dart's M1 release, so it's been updated a few times along the way. However, the code really hasn't fundamentally changed that much since the beginning. &lt;br /&gt;&lt;br /&gt;Perhaps the most interesting piece of code is the use of a Queue (from the &lt;code&gt;dart:collection&lt;/code&gt; library) to schedule watering tasks. You can click on different parts of the lawn, and the droid will fly over and water each section for a short amount of time: &lt;pre&gt;&lt;br /&gt;  _actionQueue = new Queue();&lt;br /&gt;  ...&lt;br /&gt;  _actionQueue.add({'action': 'water', 'zone': el.id});&lt;br /&gt;  ...&lt;br /&gt;  void _executeActionQueue() {&lt;br /&gt;    if (_actionQueue.isEmpty) {&lt;br /&gt;      _waitingForTimer = false;&lt;br /&gt;      _idle();&lt;br /&gt;    } else {&lt;br /&gt;      var action = _actionQueue.removeFirst();&lt;br /&gt;      _doAction(action);&lt;br /&gt;      _waitingForTimer = true;&lt;br /&gt;      new Timer(new Duration(milliseconds: TIMER_INTERVAL),&lt;br /&gt;                _executeActionQueue);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;A &lt;code&gt;Timer&lt;/code&gt; and &lt;code&gt;window.requestAnimationFrame&lt;/code&gt; are used to control animations: &lt;pre&gt;&lt;br /&gt;  void _repositionDroid(int x, int y, [Callback callback = null]) {&lt;br /&gt;    x -= (HALF * DROID_WIDTH).toInt();&lt;br /&gt;    y -= DROID_HEIGHT;&lt;br /&gt;    _droid.src = "/static/images/droid-jetpack-on-front.png";&lt;br /&gt;    _droid.style.left = "${x}px";&lt;br /&gt;    _droid.style.top = "${y}px";&lt;br /&gt;    new Timer(new Duration(milliseconds: REPOSITION_DURATION), () {&lt;br /&gt;      if (callback != null) {&lt;br /&gt;        callback();&lt;br /&gt;      } else {&lt;br /&gt;        _droid.src = "/static/images/droid-waiting-front.png";&lt;br /&gt;      }&lt;br /&gt;    });&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  void _startAnimationLoop() {&lt;br /&gt;    _animationStartTime = new DateTime.now().millisecondsSinceEpoch;&lt;br /&gt;    window.requestAnimationFrame(_animationLoop);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  void _animationLoop(int timestamp) {&lt;br /&gt;    _animationProgress = timestamp - _animationStartTime;&lt;br /&gt;    for (Callback callback in _animationCallbacks.values) {&lt;br /&gt;      callback();&lt;br /&gt;    }&lt;br /&gt;    window.requestAnimationFrame(_animationLoop);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;An &lt;code&gt;HttpRequest&lt;/code&gt; is used to send commands to IrrduinoServer which in turn sends commands to IrrduinoController in order to control the sprinkler system: &lt;pre&gt;&lt;br /&gt;  void _waterRpc(int zone) {&lt;br /&gt;    var req = new HttpRequest();&lt;br /&gt;    int secs = (TIMER_INTERVAL * SECS_PER_MS).toInt();&lt;br /&gt;    req.open("POST", "/?water-zone=true&amp;amp;zone=${zone}&amp;amp;secs=${secs}", true);&lt;br /&gt;    req.onReadyStateChange.listen((Event e) {&lt;br /&gt;      if (req.readyState == 4) {&lt;br /&gt;        if (req.status == 200) {&lt;br /&gt;          window.console.log("Watering was successful");&lt;br /&gt;        } else {&lt;br /&gt;          window.console.log("Watering was unsuccessful");&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;    });&lt;br /&gt;    req.send();&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;In total, the complete Dart code is about 110 lines long, not counting comments and closing braces. &lt;br /&gt;&lt;br /&gt;You might wonder why I chose to use Dart so soon after its release, especially since I wasn't even on the Dart team at the time. I've always gotten a kick out of coding in new languages. At the time, I figured that as long as I could talk to the DOM and make XMLHttpRequests, I could do almost anything. These days, Dart is a lot more useful thanks to the growing selection of pub packages available, but even before these things existed, Dart had enough functionality to help water a lawn ;) &lt;br /&gt;&lt;br /&gt;If you want to download the complete source code for Irrduino, you can get it from &lt;a href="http://bit.ly/waterjoeslawn"&gt;bit.ly/waterjoeslawn&lt;/a&gt;. &lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/XQBzLaC5pGE" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 14 Mar 2013 18:08:00 +0000</pubDate>
	<author>noreply@blogger.com (Shannon Behrens)</author>
<feedburner:origLink>http://jjinux.blogspot.com/2013/03/irrduino-sprinkler-system-built-using.html</feedburner:origLink></item>
<item>
	<title>Adam Coding @ Github: rikulo stream on heroku</title>
	<guid isPermaLink="false">http://financeCoding.github.com/blog/2013/03/09/rikulo-stream-on-heroku</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/dm4ED175W_M/</link>
	<description>&lt;p&gt;Tonights hacking was with &lt;a href="https://github.com/rikulo/stream"&gt;stream&lt;/a&gt; and &lt;a href="http://www.heroku.com/"&gt;heroku&lt;/a&gt;. &lt;em&gt;Stream is a Dart web server supporting request routing, filtering, template technology, file-based static resources and MVC design pattern.&lt;/em&gt; I just planned on serving static content from &lt;a href="http://www.heroku.com/"&gt;heroku&lt;/a&gt; using full dart based web server.&lt;/p&gt;

&lt;p&gt;First setup the dart build pack&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;shell&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;span class="line-number"&gt;14&lt;/span&gt;
&lt;span class="line-number"&gt;15&lt;/span&gt;
&lt;span class="line-number"&gt;16&lt;/span&gt;
&lt;span class="line-number"&gt;17&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="bash"&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;mkdir stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;heroku create stream-todomvc
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;heroku config:add &lt;span class="nv"&gt;BUILDPACK_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://github.com/igrigorik/heroku-buildpack-dart.git
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git init
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git remote add heroku git@heroku.com:stream-todomvc.git
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Creating a new project called &lt;code&gt;stream-todomvc&lt;/code&gt;. Going to use the &lt;a href="https://github.com/dart-lang/web-ui/tree/master/example/todomvc"&gt;todomvc&lt;/a&gt; from the &lt;a href="https://github.com/dart-lang/web-ui"&gt;web-ui&lt;/a&gt; project as our content for the &lt;a href="https://github.com/rikulo/stream"&gt;stream&lt;/a&gt; server. First thing that should be done is adding the dependencies to the &lt;code&gt;pubspec.yaml&lt;/code&gt; file.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;pubspec.yaml&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="yaml"&gt;&lt;span class="line"&gt;&lt;span class="l-Scalar-Plain"&gt;name&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt; &lt;span class="l-Scalar-Plain"&gt;stream_todomvc&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="l-Scalar-Plain"&gt;description&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt; &lt;span class="l-Scalar-Plain"&gt;A sample WebUI application&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="l-Scalar-Plain"&gt;dependencies&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="l-Scalar-Plain"&gt;browser&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt; &lt;span class="l-Scalar-Plain"&gt;any&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="l-Scalar-Plain"&gt;js&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt; &lt;span class="l-Scalar-Plain"&gt;any&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="l-Scalar-Plain"&gt;web_ui&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt; &lt;span class="l-Scalar-Plain"&gt;0.4.1+7&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="l-Scalar-Plain"&gt;stream&lt;/span&gt;&lt;span class="p-Indicator"&gt;:&lt;/span&gt; &lt;span class="l-Scalar-Plain"&gt;0.5.5+1&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Next I simply compied the existing &lt;a href="https://github.com/dart-lang/web-ui/tree/master/example/todomvc"&gt;todomvc&lt;/a&gt; project out into my &lt;a href="http://stream-todomvc.herokuapp.com/out/index.html"&gt;stream-todomvc&lt;/a&gt; project.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;shell&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="bash"&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;cp ~/dart/web-ui/example/todomvc/* ./web/
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://docs.rikulo.org/stream/latest/Getting_Started/Introduction.html"&gt;stream intro&lt;/a&gt; documentation goes over some basic configurations and settings. I’m just going to use them for now to get something running right away. The key to note when serving code from the &lt;code&gt;web/&lt;/code&gt; folder in dart projects is having the &lt;a href="https://github.com/rikulo/stream"&gt;stream&lt;/a&gt; server code in &lt;code&gt;web/webapp/&lt;/code&gt;. That way &lt;a href="https://github.com/rikulo/stream"&gt;stream&lt;/a&gt; can find all your resources with little configuration. With very little dart code we can have static web server going.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;web/webapp/server.dart&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;span class="line-number"&gt;14&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="n"&gt;library&lt;/span&gt; &lt;span class="n"&gt;server&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="s1"&gt;'dart:io'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="s2"&gt;"package:stream/stream.dart"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;containsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'PORT'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'PORT'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8080&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'0.0.0.0'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="n"&gt;streamServer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;StreamServer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="n"&gt;streamServer&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;  &lt;span class="p"&gt;..&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Since this was a &lt;a href="https://github.com/dart-lang/web-ui"&gt;web-ui&lt;/a&gt; project we need to have a &lt;code&gt;build.dart&lt;/code&gt; file help us with transforming the polyfill web components.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;build.dart&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="dart"&gt;&lt;span class="line"&gt;&lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="s1"&gt;'dart:io'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="n"&gt;import&lt;/span&gt; &lt;span class="s1"&gt;'package:web_ui/component_build.dart'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Options&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'web/index.html'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;The &lt;a href="http://www.heroku.com/"&gt;heroku&lt;/a&gt; environment requires a &lt;a href="https://devcenter.heroku.com/articles/procfile"&gt;procfile&lt;/a&gt; configuration to let the service know the type of commands to run.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;Procfile&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="text"&gt;&lt;span class="line"&gt;web: ./dart-sdk/bin/dart --package-root=./packages/ web/webapp/server.dart
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Next we build all the static data for our webapp to function. This will include calling &lt;code&gt;build.dart&lt;/code&gt; and &lt;code&gt;dart2js&lt;/code&gt;. The second step of calling &lt;code&gt;dart2js&lt;/code&gt; helps with clients that do not have the &lt;code&gt;dartvm&lt;/code&gt; built in.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;shell&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="bash"&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;pub install
&lt;/span&gt;&lt;span class="line"&gt;Resolving dependencies...
&lt;/span&gt;&lt;span class="line"&gt;Dependencies installed!
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;dart build.dart
&lt;/span&gt;&lt;span class="line"&gt;Total &lt;span class="nb"&gt;time &lt;/span&gt;spent on web/index.html                           -- 839 ms
&lt;/span&gt;&lt;span class="line"&gt;Total &lt;span class="nb"&gt;time&lt;/span&gt;                                                   -- 863 ms
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;dart2js -oweb/out/index.html_bootstrap.dart.js web/out/index.html_bootstrap.dart
&lt;/span&gt;&lt;span class="line"&gt;Using snapshot /Users/adam/Documents/DartEditor/dart/dart-sdk/lib/_internal/compiler/implementation/dart2js.dart.snapshot
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Now everything should be ready for deployment.&lt;/p&gt;

&lt;figure class="code"&gt;&lt;span&gt;shell&lt;/span&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class="line-number"&gt;1&lt;/span&gt;
&lt;span class="line-number"&gt;2&lt;/span&gt;
&lt;span class="line-number"&gt;3&lt;/span&gt;
&lt;span class="line-number"&gt;4&lt;/span&gt;
&lt;span class="line-number"&gt;5&lt;/span&gt;
&lt;span class="line-number"&gt;6&lt;/span&gt;
&lt;span class="line-number"&gt;7&lt;/span&gt;
&lt;span class="line-number"&gt;8&lt;/span&gt;
&lt;span class="line-number"&gt;9&lt;/span&gt;
&lt;span class="line-number"&gt;10&lt;/span&gt;
&lt;span class="line-number"&gt;11&lt;/span&gt;
&lt;span class="line-number"&gt;12&lt;/span&gt;
&lt;span class="line-number"&gt;13&lt;/span&gt;
&lt;span class="line-number"&gt;14&lt;/span&gt;
&lt;span class="line-number"&gt;15&lt;/span&gt;
&lt;span class="line-number"&gt;16&lt;/span&gt;
&lt;span class="line-number"&gt;17&lt;/span&gt;
&lt;span class="line-number"&gt;18&lt;/span&gt;
&lt;span class="line-number"&gt;19&lt;/span&gt;
&lt;span class="line-number"&gt;20&lt;/span&gt;
&lt;span class="line-number"&gt;21&lt;/span&gt;
&lt;span class="line-number"&gt;22&lt;/span&gt;
&lt;span class="line-number"&gt;23&lt;/span&gt;
&lt;span class="line-number"&gt;24&lt;/span&gt;
&lt;span class="line-number"&gt;25&lt;/span&gt;
&lt;span class="line-number"&gt;26&lt;/span&gt;
&lt;span class="line-number"&gt;27&lt;/span&gt;
&lt;span class="line-number"&gt;28&lt;/span&gt;
&lt;span class="line-number"&gt;29&lt;/span&gt;
&lt;span class="line-number"&gt;30&lt;/span&gt;
&lt;span class="line-number"&gt;31&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;code class="bash"&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git add -a -m &lt;span class="s2"&gt;"ready for deploy"&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;adam@Adams-MacBook-Air:~/dart/stream_todomvc
&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git push -v --set-upstream heroku master:master
&lt;/span&gt;&lt;span class="line"&gt;Pushing to git@heroku.com:stream-todomvc.git
&lt;/span&gt;&lt;span class="line"&gt;Counting objects: 5, &lt;span class="k"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;span class="line"&gt;Delta compression using up to 4 threads.
&lt;/span&gt;&lt;span class="line"&gt;Compressing objects: 100% &lt;span class="o"&gt;(&lt;/span&gt;3/3&lt;span class="o"&gt;)&lt;/span&gt;, &lt;span class="k"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;span class="line"&gt;Writing objects: 100% &lt;span class="o"&gt;(&lt;/span&gt;3/3&lt;span class="o"&gt;)&lt;/span&gt;, 283 bytes, &lt;span class="k"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;span class="line"&gt;Total 3 &lt;span class="o"&gt;(&lt;/span&gt;delta 2&lt;span class="o"&gt;)&lt;/span&gt;, reused 0 &lt;span class="o"&gt;(&lt;/span&gt;delta 0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Fetching custom git buildpack... &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Dart app detected
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Installing Dart VM, build: latest
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Copy Dart binaries to app root
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Install packages
&lt;/span&gt;&lt;span class="line"&gt;*** Found pubspec.yaml in .
&lt;/span&gt;&lt;span class="line"&gt;Resolving dependencies...
&lt;/span&gt;&lt;span class="line"&gt;Dependencies installed!
&lt;/span&gt;&lt;span class="line"&gt;Fixed web symlink
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Discovering process types
&lt;/span&gt;&lt;span class="line"&gt;       Procfile declares types -&amp;gt; web
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Compiled slug size: 8.9MB
&lt;/span&gt;&lt;span class="line"&gt;-----&amp;gt; Launching... &lt;span class="k"&gt;done&lt;/span&gt;, v7
&lt;/span&gt;&lt;span class="line"&gt;       http://stream-todomvc.herokuapp.com deployed to Heroku
&lt;/span&gt;&lt;span class="line"&gt;
&lt;/span&gt;&lt;span class="line"&gt;To git@heroku.com:stream-todomvc.git
&lt;/span&gt;&lt;span class="line"&gt;   042f1f4..b35984b  master -&amp;gt; master
&lt;/span&gt;&lt;span class="line"&gt;updating &lt;span class="nb"&gt;local &lt;/span&gt;tracking ref &lt;span class="s1"&gt;'refs/remotes/heroku/master'&lt;/span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;


&lt;p&gt;Deploying to &lt;a href="http://www.heroku.com/"&gt;heroku&lt;/a&gt; in this style is just a good starting point. &lt;a href="https://github.com/dart-lang/web-ui"&gt;web-ui&lt;/a&gt; and &lt;a href="http://www.dartlang.org"&gt;dart&lt;/a&gt; in general is still working on a deployment story. The URL for the &lt;a href="http://stream-todomvc.herokuapp.com/out/index.html"&gt;stream-todomvc&lt;/a&gt; will contain &lt;code&gt;out&lt;/code&gt; in its location, not very desirable. In the future a &lt;a href="https://github.com/dart-lang/buildtool"&gt;buildtool&lt;/a&gt; will aid the deployment story for &lt;a href="http://www.dartlang.org"&gt;dart&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Check out the live version of &lt;a href="http://stream-todomvc.herokuapp.com/out/index.html"&gt;stream-todomvc&lt;/a&gt; with full source code available at the &lt;a href="https://github.com/financeCoding/stream-todomvc"&gt;stream-todomvc github project&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/dm4ED175W_M" height="1" width="1"/&gt;</description>
	<pubDate>Sat, 09 Mar 2013 15:16:00 +0000</pubDate>
<feedburner:origLink>http://financeCoding.github.com/blog/2013/03/09/rikulo-stream-on-heroku/</feedburner:origLink></item>
<item>
	<title>Dartcasts.com: Episode 11: An Introduction to DartMocks

An introduction to...</title>
	<guid isPermaLink="false">http://dartcasts.com/post/44615403012</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/9MIwtYvSAgY/44615403012</link>
	<description>&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Episode 11: An Introduction to DartMocks&lt;/h1&gt;

&lt;p&gt;An introduction to DartMock - a mock framework for Dart inspired by RSpec.&lt;/p&gt;

&lt;h3&gt;Learn More&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/dartmocks"&gt;http://pub.dartlang.org/packages/dartmocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/vsavkin/dartmocks"&gt;http://github.com/vsavkin/dartmocks&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/9MIwtYvSAgY" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 05 Mar 2013 12:42:00 +0000</pubDate>
<feedburner:origLink>http://dartcasts.com/post/44615403012</feedburner:origLink></item>
<item>
	<title>Shannon -jj Behrens: Dart on a Chromebook: Success!</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-11788780.post-7946906515025049639</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/1EiXG77mCa4/dart-on-chromebook-success.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-zo0Nhn4Tj28/US7EjS8Y2FI/AAAAAAAAKtM/1lgHE7G7sek/s1600/Screenshot+-+022713+-+18:32:16.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-zo0Nhn4Tj28/US7EjS8Y2FI/AAAAAAAAKtM/1lgHE7G7sek/s320/Screenshot+-+022713+-+18:32:16.png" /&gt;&lt;/a&gt;I finally have a viable approach to editing Dart directly on a Chromebook running ChromeOS! The usual approach to developing Dart code on a Chromebook is to use Chrome Remote Desktop to connect to another development machine. However, I wanted an approach that would let me develop in Dart while offline, for instance if I'm giving a talk on Dart and my internet connection goes down.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/dnschneid/crouton"&gt;Crouton&lt;/a&gt; is a set of scripts based around debootstrap that bundle up into an easy-to-use, Chromium OS-centric Ubuntu chroot generator. Using Crouton, I was able to create a chroot running a basic Ubuntu setup. Within the chroot, I was able to install a JDK and then Dart Editor. Everything works, as you can see in the picture. I can switch back and forth between XFCE and ChromeOS's desktop using a key combination, and everything still runs at native speed since it's just a simple chroot.&lt;br /&gt;&lt;br /&gt;I got everything working on my wife's &lt;a href="http://www.samsung.com/us/computer/chrome-os-devices/XE500C21-A01US"&gt;Samsung Series 5 Chromebook&lt;/a&gt; running an Intel Atom processor. I have a newer ARM-based Chromebook, but there is currently no ARM port of the Dart VM. I used the 32-bit version of the JDK and the 32-bit version of Dart Editor.&lt;br /&gt;&lt;br /&gt;I'm pretty excited that this works because this is one of the few things that was preventing me from fully switching to a Chromebook :) Now, all I need to do is get my hands on a &lt;a href="http://www.google.com/intl/en/chrome/devices/chromebook-pixel/#utm_campaign=en&amp;amp;utm_source=en-ha-na-us-bkws&amp;amp;utm_medium=ha"&gt;Chromebook Pixel&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/1EiXG77mCa4" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 28 Feb 2013 06:57:00 +0000</pubDate>
	<author>noreply@blogger.com (Shannon Behrens)</author>
<feedburner:origLink>http://jjinux.blogspot.com/2013/02/dart-on-chromebook-success.html</feedburner:origLink></item>
<item>
	<title>On Dart (Dzenan Ridjanovic): Category Links Web Components</title>
	<guid isPermaLink="false">http://dzenanr.github.com/2013/02/25/category-links-web-components.html</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/ZPndohLjh54/category-links-web-components.html</link>
	<description>Web components of the Category Links model are explained.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/ZPndohLjh54" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 25 Feb 2013 21:25:00 +0000</pubDate>
<feedburner:origLink>http://dzenanr.github.com/2013/02/25/category-links-web-components.html</feedburner:origLink></item>
<item>
	<title>Trials (and Errors) in Dart: New Dart:io hotness!</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-377877168649731651.post-938603773239477984</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/aLT2AW2vjZY/new-dartio-hotness.html</link>
	<description>&lt;p&gt;It's been a very long time since my last post for which I apologize. I hope to get back into Dart blogging again soon. A recent announcement on the dartlang mailing list got me excited. &lt;a href="https://groups.google.com/a/dartlang.org/d/topic/misc/GA7oFUkdrbQ/discussion"&gt;BREAKING CHANGE: New version of dart:io&lt;/a&gt;. I've been waiting for this to finally land in bleeding_edge. As a lot of my work is with command line applications. It's great seeing dart:io finally getting some love.&lt;/p&gt; &lt;p&gt;Now there were a few surprises that cropped up with the new version of the library. I'm going to note a couple of them I've come across so far that I've noticed. I won't get into details about ones covered in the mailing list announcement. There are a number of others that were too small to be covered there. One big thing I noticed was the removal of &lt;code&gt;HttpServer.addRequestHandler&lt;/code&gt; as that was a quick and dirty way of setting up the basics of routing in the server. Now all requests are sent to &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_io/HttpServer.html#listen"&gt;HttpServer.listen&lt;/a&gt;. Similarly, server isn't started by creating a new HttpServer instance and then running listen on it, rather use a static method, &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_io/HttpServer.html#bind"&gt;HttpServer.bind&lt;/a&gt; on the HttpServer class which returns a Future which provides the server instance.&lt;/p&gt; &lt;p&gt;All of this is because the dart:io is being converted to &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_async/Future.html"&gt;Futures&lt;/a&gt; and &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_async/Stream.html"&gt;Streams&lt;/a&gt;. And it is a change for the best, making the libraries consistent across libraries and API's. This has also made for some changes to some of the other classes in dart:io and just some clean up which makes sense as well.&lt;/p&gt; &lt;p&gt;Lets start with our eventHandler. In the past adding a RequestHandler to the HttpServer would take two arguments. An HttpRequest and an HttpResponse. The first being the request to the server and the latter being the response back from the server to the client. However, I cannot think of a situation where these two objects would not be intertwined. Apparently the dart developers felt the same way. Now, the new version of a requestHandler (see above), only accepts an HttpRequest. The corresponding HttpResponse object is a property of the HttpRequest, and can be accessed like so: &lt;code&gt;HttpResponse res = httpRequest.response;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Also in HttpRequest, the uri property is no longer a string but returns a &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_uri/Uri.html"&gt;URI&lt;/a&gt; object. As such, the path property of HttpRequest has been removed in favour of: &lt;code&gt;httpRequest.uri.path&lt;/code&gt;. Similarly, session is no longer a method but rather returns a full session object directly. This means that it no longer accepts an init callback to preform a specialized initialization of the session but I'm not aware of that functionality being used very frequently.&lt;/p&gt; &lt;p&gt;[Edit:]&lt;br /&gt;One aspect that I neglected to mention earlier is that writing to the HttpResponse stream is a little easier now as well. In the past we would need to use &lt;code&gt;httpResponse.outputStream.write(...)&lt;/code&gt; whereas now, we write directly to the httpResponse itself. For example: &lt;/p&gt;&lt;pre&gt;var res = httpRequest.response;&lt;br /&gt;res.addString(...);&lt;br /&gt;// Alternatively we can also use add(List data)&lt;br /&gt;// or addStream(Stream&amp;gt; data).&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_io/HttpResponse.html#add"&gt;Check out the API for HttpResponse.&lt;/a&gt;[/Edit]&lt;p&gt;&lt;/p&gt; &lt;p&gt;As an experiment with the new library, in particular with the HttpServer and related functionality, I created a very basic webserver example. This sample is not production usable, or even complete in any way. But I think it does provide a good introduction into how the new libraries are used and how extend the Stream interfaces to implement a very basic routing mechanism into the server. The source is available on github: &lt;a href="https://github.com/butlermatt/sample_server"&gt;sample_server&lt;/a&gt;. This is the basic premise that I'm now implementing in a project that I'm working on at the moment. With any luck I'll be able to extend the functionality of the server and abstract it away from the core logic I'm working on to be able to release the library for others if they are interested. In the mean time the sample_server should help you to get up and running.&lt;/p&gt; &lt;p&gt;One thing I do have to mention, is it was extremely easy to implement my own stream with the route by extending &lt;code&gt;Stream&lt;/code&gt;, and just using a &lt;a href="http://api.dartlang.org/docs/bleeding_edge/dart_async/StreamController.html"&gt;StreamController&lt;/a&gt; to provide most of the functionality. Only needed to implement the listen() method which in itself passes it on to the controller anyways. Love it!&lt;/p&gt; &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;del&gt; Currently this requires a bleeding_edge version, as these changes have not yet been added to the stable build. They were written with version: 0.1.2_r18836 and tested with version: 0.1.2_r18968. Details may change prior to stable release.&lt;/del&gt;&lt;ins&gt;The latest stable version of the Dart SDK has just been released and supports this API. It can be found in version: 0.4.0_r18915.&lt;/ins&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/aLT2AW2vjZY" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 25 Feb 2013 15:09:00 +0000</pubDate>
	<author>noreply@blogger.com (Matthew Butler)</author>
<feedburner:origLink>http://darttrials.blogspot.com/2013/02/new-dartio-hotness.html</feedburner:origLink></item>
<item>
	<title>Christian Grobmeier: A free book. Dart: Up and Running</title>
	<guid isPermaLink="false">http://www.grobmeier.de/?p=1950</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/AyFGGG0SMlI/dart-up-and-running-21022013.html</link>
	<description>&lt;p&gt;Recently I got the book “Dart: Up and Running” written by &lt;a href="https://plus.google.com/105904968710974272643" target="_blank"&gt;Kathy Walrath&lt;/a&gt; and &lt;a href="https://plus.google.com/118397406534237711570" target="_blank"&gt;Seth Ladd&lt;/a&gt;. Both authors are well-known in the Dart community. Kathy is responsible for so much great docs on &lt;a href="http://www.dartlang.org" target="_blank"&gt;dartlang.org&lt;/a&gt; and Seth was the Dart-Ambassador since the language first faced the world (or even earlier, who knows). Definitely you want to meet at least one of them in your favorite coffee shop when you are running into Dart related trouble.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.grobmeier.de/wp-content/uploads/2013/02/dartupandrunning.jpg?9d7bd4"&gt;&lt;img alt="dartupandrunning" class="size-medium wp-image-1971 aligncenter" height="300" src="http://www.grobmeier.de/wp-content/uploads/2013/02/dartupandrunning-228x300.jpg?9d7bd4" width="228" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Book itself is one of the first of its kind. Currently I know about two more Books on Dart, but thats it. As the language still progresses and changes are flowing in every day, it is a difficult matter to write a books about Dart. Kathy and Seth decided to write a short but valuable book, tailored for the busy developer who wants to get an overview on the Dart eco system. With that in mind most of the content will be valid for quite a while.&lt;/p&gt;
&lt;p&gt;Actually you can read everything you need to get started quickly. After a brief introduction of the “whats hot” kind you’ll be introduced into the Dart syntax. You’ll see a lot of the great language features Dart supports, like named Constructors or the Cascade Operator.&lt;br /&gt;
The second chapter is a tour through the current Dart libraries, like for working with Isolates, HTML manipulation or I/O. It is a brief read which shows you what you can do with it, but doesn’t exhaust all possibilities. Of course a chapter on the great Dart toolset is not missing. If you ever wondered why people are so excited on Dart, this one of the reasons: the Editor and Dependency Resolver (aka Pub) is already built-in. The chapter introduces all of them and points you into the right direction when you are just starting. Finally the book ends with an example chapter.&lt;/p&gt;
&lt;p&gt;This book is one of the kind you need to have on your desk until you know it from mind. It is an easy to read, easy to understand book which helps you to get started quickly. Don’t expect Kathy &amp;amp; Seth will explain object oriented paradigmas to you: it is really focused on the language itself.&lt;/p&gt;
&lt;p&gt;If you are curious and would like to read more on the book I have some good – no GREAT – news for you. &lt;strong&gt;The whole book can be read online and free of charge.&lt;/strong&gt; Just head on to the “&lt;a href="http://www.dartlang.org/docs/dart-up-and-running/" target="_blank"&gt;Dart: Up and running website&lt;/a&gt;” and start hacking today. I also would like to mention that the books text and all source code examples are available on &lt;a href="https://github.com/dart-lang/dart-up-and-running-book" target="_blank"&gt;GitHub&lt;/a&gt;. You see, there is no excuse anymore. &lt;img alt=";-)" class="wp-smiley" src="http://www.grobmeier.de/wp-includes/images/smilies/icon_wink.gif?9d7bd4" /&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.grobmeier.de/wp-content/uploads/2013/02/buyfromamazoncom.gif?9d7bd4"&gt;&lt;img alt="buyfromamazoncom" class="size-full wp-image-1957 alignleft" height="43" src="http://www.grobmeier.de/wp-content/uploads/2013/02/buyfromamazoncom.gif?9d7bd4" width="120" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=grobmeier-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1449330894" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;a href="http://www.amazon.com/gp/product/B009WA0VNU/ref=as_li_tf_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B009WA0VNU&amp;amp;linkCode=as2&amp;amp;tag=grobmeier-20"&gt;Kindle Version&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=grobmeier-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B009WA0VNU" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.grobmeier.de/wp-content/uploads/2013/02/buyfromamazonde.gif?9d7bd4"&gt;&lt;br /&gt;
&lt;img alt="buyfromamazonde" class="size-full wp-image-1958" height="20" src="http://www.grobmeier.de/wp-content/uploads/2013/02/buyfromamazonde.gif?9d7bd4" width="158" /&gt;&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.de/e/ir?t=grobmeier-21&amp;amp;l=as2&amp;amp;o=3&amp;amp;a=1449330894" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;a href="http://www.amazon.de/gp/product/B009WA0VNU/ref=as_li_tf_tl?ie=UTF8&amp;amp;camp=1638&amp;amp;creative=6742&amp;amp;creativeASIN=B009WA0VNU&amp;amp;linkCode=as2&amp;amp;tag=grobmeier-21"&gt;Kindle Version&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.de/e/ir?t=grobmeier-21&amp;amp;l=as2&amp;amp;o=3&amp;amp;a=B009WA0VNU" style="border: none !important; margin: 0px !important;" width="1" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/AyFGGG0SMlI" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 21 Feb 2013 08:57:23 +0000</pubDate>
<feedburner:origLink>http://www.grobmeier.de/dart-up-and-running-21022013.html</feedburner:origLink></item>
<item>
	<title>Shannon -jj Behrens: Dart with Google Web Toolkit</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-11788780.post-5167725617323780129</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/yYhAMFdXRcA/dart-with-google-web-toolkit.html</link>
	<description>&lt;div dir="ltr" style="text-align: left;"&gt;&lt;a href="http://4.bp.blogspot.com/-RRHl7_CF_h0/USPcglvXARI/AAAAAAAABNk/OsAaM0I-EeI/s1600/small_thumbnail.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-RRHl7_CF_h0/USPcglvXARI/AAAAAAAABNk/OsAaM0I-EeI/s320/small_thumbnail.png" /&gt;&lt;/a&gt;&lt;i&gt;Cross-posted from &lt;a href="http://news.dartlang.org/"&gt;Dart News &amp;amp; Updates&lt;/a&gt;.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In this &lt;a href="http://www.youtube.com/watch?v=F33aPc5FjVo"&gt;episode of Dartisans&lt;/a&gt;, I'm going to show you a variety of ways to use Dart with Google Web Toolkit. I know that there are a lot of GWT developers out there who would like to give Dart a shot, but they aren't sure how because they already have a large, successful app that's written in GWT. I'm going to show you ways to integrate Dart into your existing GWT application without having to rewrite it from scratch.&lt;br /&gt;&lt;br /&gt;To do this, I've built a sample application that uses both GWT and Dart. I'll show you how to setup a development environment so that you can work with both technologies. Then, I'll show you a variety of ways in which you can get GWT and Dart to interoperate, such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Using GWT and Dart to manage different parts of the same page&lt;/li&gt;&lt;li&gt;Using Dart to retrieve JSON from a Java servlet&lt;/li&gt;&lt;li&gt;Using window.postMessage and JSNI to pass messages between GWT and Dart&lt;/li&gt;&lt;li&gt;Using JavaScript, JSNI, and Dart's js package for synchronous interoperability between GWT and Dart&lt;/li&gt;&lt;li&gt;Using CustomEvent objects and Elemental to pass messages between GWT and Dart&lt;/li&gt;&lt;/ul&gt;Rather than show you a one-size-fits-all solution, I decided to show you a bunch of approaches so that you could pick the right tool for the job. Each of them has stengths and weaknesses, and I'll cover those along the way as well.&lt;br /&gt;&lt;br /&gt;Aside from watching the video, you can also download the &lt;a href="http://bit.ly/dart_with_gwt"&gt;source code&lt;/a&gt; or view the &lt;a href="https://github.com/dart-lang/dart-with-x-samples/blob/master/gwt/GwtApplication/transcript.md"&gt;video transcript&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As always, we invite you to join the discussion on the &lt;a href="http://www.dartlang.org/mailing-list"&gt;Dart mailing list&lt;/a&gt;, and ask us questions on &lt;a href="http://stackoverflow.com/tags/dart"&gt;Stack Overflow&lt;/a&gt;. Your feedback is important. Thanks for checking out Dart! &lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/yYhAMFdXRcA" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 19 Feb 2013 20:38:00 +0000</pubDate>
	<author>noreply@blogger.com (Shannon Behrens)</author>
<feedburner:origLink>http://jjinux.blogspot.com/2013/02/dart-with-google-web-toolkit.html</feedburner:origLink></item>
<item>
	<title>On Dart (Dzenan Ridjanovic): Category Links Model</title>
	<guid isPermaLink="false">http://dzenanr.github.com/2013/02/12/category-links-model.html</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/2JljPhDS2ZI/category-links-model.html</link>
	<description>I have created the Category Links application to show how to use data in a simple model through web components.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/2JljPhDS2ZI" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 12 Feb 2013 20:15:00 +0000</pubDate>
<feedburner:origLink>http://dzenanr.github.com/2013/02/12/category-links-model.html</feedburner:origLink></item>
<item>
	<title>Adam Coding @ Github: Dart Google Client Apis Now Available On Pub</title>
	<guid isPermaLink="false">http://financeCoding.github.com/blog/2013/02/08/google-client-apis-now-available-on-pub</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/r8NJ_qmA1pc/</link>
	<description>&lt;p&gt;The &lt;a href="https://github.com/dart-gde?tab=members"&gt;dart-gde&lt;/a&gt; team now brings you not only a generator to create google client apis but also &lt;a href="http://pub.dartlang.org"&gt;pub.dartlang.org&lt;/a&gt; hosted packages. Lot of thanks goes to &lt;a href="https://profiles.google.com/scarygami"&gt;Gerwin Sturm&lt;/a&gt; for all of his hard work over the last few weeks developing &lt;a href="https://github.com/dart-gde/discovery_api_dart_client_generator"&gt;discovery_api_dart_client_generator&lt;/a&gt; and &lt;a href="https://github.com/dart-gde/dart-google-oauth2-library"&gt;dart-google-oauth2-library&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We plan to keep the client libraries up to date with &lt;a href="https://github.com/dart-gde/discovery_api_dart_client_generator/blob/master/tool/update.dart"&gt;uploader.dart&lt;/a&gt; script. Still somewhat a manual process, future automation could happen when/if we have the ability to get notified about google api changes. For now we will push updates when appropriate. This will ensure that we can push the latest versions of the apis to pub and still have previous revisions available. Some of the more intricate parts of this script include auto version incrementing pubspec files and syncing to github, then pushing to pub.&lt;/p&gt;

&lt;p&gt;Would you want to contribute to this project? Please feel free to ping us &lt;a href="https://profiles.google.com/financeCoding"&gt;Adam Singer&lt;/a&gt;/&lt;a href="https://profiles.google.com/scarygami"&gt;Gerwin Sturm&lt;/a&gt; on &lt;a href="https://plus.google.com"&gt;g+&lt;/a&gt;, we’re definitely looking to refactor some parts and test others. Our main focus for this release was to get something out the door that is pleasantly usable.&lt;/p&gt;

&lt;p&gt;Many hours of testing and development was done to have a simple and easy way to use the google client apis in dart! We hope you enjoy and look forward to seeing what you build.
To get started with client api examples check out &lt;a href="https://github.com/dart-gde/dart_api_client_examples"&gt;dart_api_client_examples&lt;/a&gt;. The &lt;a href="http://www.github.com"&gt;github&lt;/a&gt; hosted source code can be found at &lt;a href="https://github.com/dart-google-apis"&gt;dart-google-apis&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Full list of available Google client apis on &lt;a href="http://pub.dartlang.org"&gt;pub.dartlang.org&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adexchangebuyer_v1_api"&gt;google_adexchangebuyer_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adexchangebuyer_v1_1_api"&gt;google_adexchangebuyer_v1_1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adexchangeseller_v1_api"&gt;google_adexchangeseller_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adsense_v1_api"&gt;google_adsense_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adsense_v1_1_api"&gt;google_adsense_v1_1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adsense_v1_2_api"&gt;google_adsense_v1_2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_adsensehost_v4_1_api"&gt;google_adsensehost_v4_1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_analytics_v2_4_api"&gt;google_analytics_v2_4_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_analytics_v3_api"&gt;google_analytics_v3_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_androidpublisher_v1_api"&gt;google_androidpublisher_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_audit_v1_api"&gt;google_audit_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_bigquery_v2_api"&gt;google_bigquery_v2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_blogger_v2_api"&gt;google_blogger_v2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_blogger_v3_api"&gt;google_blogger_v3_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_books_v1_api"&gt;google_books_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_calendar_v3_api"&gt;google_calendar_v3_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_civicinfo_us_v1_api"&gt;google_civicinfo_us_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_compute_v1beta12_api"&gt;google_compute_v1beta12_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_compute_v1beta13_api"&gt;google_compute_v1beta13_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_compute_v1beta14_api"&gt;google_compute_v1beta14_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_coordinate_v1_api"&gt;google_coordinate_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_customsearch_v1_api"&gt;google_customsearch_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_dfareporting_v1_api"&gt;google_dfareporting_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_dfareporting_v1_1_api"&gt;google_dfareporting_v1_1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_discovery_v1_api"&gt;google_discovery_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_drive_v1_api"&gt;google_drive_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_drive_v2_api"&gt;google_drive_v2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_freebase_v1sandbox_api"&gt;google_freebase_v1sandbox_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_freebase_v1_api"&gt;google_freebase_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_fusiontables_v1_api"&gt;google_fusiontables_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_gan_v1beta1_api"&gt;google_gan_v1beta1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_groupsmigration_v1_api"&gt;google_groupsmigration_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_groupssettings_v1_api"&gt;google_groupssettings_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_latitude_v1_api"&gt;google_latitude_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_licensing_v1_api"&gt;google_licensing_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_oauth2_v1_api"&gt;google_oauth2_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_oauth2_v2_api"&gt;google_oauth2_v2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_orkut_v2_api"&gt;google_orkut_v2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_pagespeedonline_v1_api"&gt;google_pagespeedonline_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_plus_v1moments_api"&gt;google_plus_v1moments_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_plus_v1_api"&gt;google_plus_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_prediction_v1_2_api"&gt;google_prediction_v1_2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_prediction_v1_3_api"&gt;google_prediction_v1_3_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_prediction_v1_4_api"&gt;google_prediction_v1_4_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_prediction_v1_5_api"&gt;google_prediction_v1_5_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_reseller_v1sandbox_api"&gt;google_reseller_v1sandbox_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_reseller_v1_api"&gt;google_reseller_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_shopping_v1_api"&gt;google_shopping_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_siteverification_v1_api"&gt;google_siteverification_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_storage_v1beta1_api"&gt;google_storage_v1beta1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_taskqueue_v1beta1_api"&gt;google_taskqueue_v1beta1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_taskqueue_v1beta2_api"&gt;google_taskqueue_v1beta2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_tasks_v1_api"&gt;google_tasks_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_translate_v2_api"&gt;google_translate_v2_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_urlshortener_v1_api"&gt;google_urlshortener_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_webfonts_v1_api"&gt;google_webfonts_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_youtube_v3_api"&gt;google_youtube_v3_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_youtubeanalytics_v1_api"&gt;google_youtubeanalytics_v1_api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pub.dartlang.org/packages/google_youtubeanalytics_v1beta1_api"&gt;google_youtubeanalytics_v1beta1_api&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/r8NJ_qmA1pc" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 08 Feb 2013 22:18:00 +0000</pubDate>
<feedburner:origLink>http://financeCoding.github.com/blog/2013/02/08/google-client-apis-now-available-on-pub/</feedburner:origLink></item>
<item>
	<title>Kevin Moore: Dart is a great language for shell programming, too</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2115056243892631308.post-7611005524280150405</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/Y9OKz9n0SA4/dart-is-great-language-for-shell.html</link>
	<description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://twitter.com/kevmoo/status/298897666518155264" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-KcGu6kTfGlY/URKQXkfObBI/AAAAAAAAIIc/JGTufj9wz1M/s1600/Screen+Shot+2013-02-06+at+12.18.00+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I asked Twitter nicely yesterday. The only response:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://twitter.com/jnazario/statuses/298961519964737536" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-ySYuemzcB-c/URKQ0CGL2nI/AAAAAAAAIIk/qfGTK0ABMiA/s1600/Screen+Shot+2013-02-06+at+12.19.51+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I don't dislike writing bash scripts. I hate it. I also hate the lack of portability, as pointed out by &lt;a class="g-profile" href="http://plus.google.com/101409281065555048852" target="_blank"&gt;+Daniel Steigerwald&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://plus.google.com/110066012384188006594/posts/fXfwP82Uw9N" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-tMWAD3Wmy60/URKRQk501yI/AAAAAAAAIIs/dHZhkXfe-fE/s1600/Screen+Shot+2013-02-06+at+12.21.42+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Great idea, &lt;a class="g-profile" href="http://plus.google.com/101409281065555048852" target="_blank"&gt;+Daniel Steigerwald&lt;/a&gt;, but why use NodeJS when I could use Dart?&lt;br /&gt;&lt;br /&gt;If you fetch the latest version of the &lt;a href="https://github.com/kevmoo/bot.dart"&gt;Dart Bag-of-Tricks&lt;/a&gt;, you'll notice a new binary &lt;code&gt;bin/bench&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;If you're running bash and &lt;code&gt;dart&lt;/code&gt; is in your path you can execute this directly. Otherwise run it through dart: &lt;code&gt;dart bin/bench&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;If you add &lt;code&gt;bot.dart/bin&lt;/code&gt; to your path you can do things like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-zRwUjyP8h5Q/URKSud1fO_I/AAAAAAAAII0/gIX789r8Vp8/s1600/Screen+Shot+2013-02-06+at+12.26.47+PM.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-zRwUjyP8h5Q/URKSud1fO_I/AAAAAAAAII0/gIX789r8Vp8/s1600/Screen+Shot+2013-02-06+at+12.26.47+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;There is also a paramater &lt;code&gt;-r, --run_count    (defaults to "20")&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-D6U8UfEsoCI/URKS8J_iCdI/AAAAAAAAII8/O_vHQcxIfJ8/s1600/Screen+Shot+2013-02-06+at+12.27.02+PM.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-D6U8UfEsoCI/URKS8J_iCdI/AAAAAAAAII8/O_vHQcxIfJ8/s1600/Screen+Shot+2013-02-06+at+12.27.02+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;Dart is more than just a good tool for web apps.&lt;br /&gt;&lt;br /&gt;Happy hacking.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/Y9OKz9n0SA4" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 06 Feb 2013 17:32:00 +0000</pubDate>
	<author>noreply@blogger.com (Kevin Moore)</author>
<feedburner:origLink>http://work.j832.com/2013/02/dart-is-great-language-for-shell.html</feedburner:origLink></item>
<item>
	<title>Kevin Moore: Headless Browser Testing: Dart, DumpRenderTree, drone.io</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2115056243892631308.post-2268258971059714838</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/JsigIxvMHHs/headless-browser-testing-dart.html</link>
	<description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-el8hBxU7v0I/UQrybo2AZDI/AAAAAAAAIH8/-I1adHW5o_E/s1600/bot_logo_headless.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-el8hBxU7v0I/UQrybo2AZDI/AAAAAAAAIH8/-I1adHW5o_E/s1600/bot_logo_headless.png" /&gt;&lt;/a&gt;&lt;/div&gt;When writing any software, even for the web, I try to do as much testing as possible outside the browser.&lt;br /&gt;&lt;br /&gt;A lot of great testing can be done of algorithms, data models, and business logic without booting up Chrome.&lt;br /&gt;&lt;br /&gt;Node.js enabled this with Javascript. Dart has had an out-of-browser--read console--story since day one.&lt;br /&gt;&lt;br /&gt;But some things you must test in a browser.&lt;br /&gt;&lt;br /&gt;The &lt;a href="https://github.com/kevmoo/bot.dart"&gt;Dart Bag of Tricks (BOT)&lt;/a&gt; has had browser tests since the beginning. There are only a few tests that must be run in the browser, but I make sure to run all tests both on the console and in the browser if they can run both places.&lt;br /&gt;&lt;br /&gt;Browser tests are great, but they don't fit well into a build workflow or a continuous integration tool.&lt;br /&gt;&lt;br /&gt;For that you need a way to run and control a browser (or a browser-like thing) via the console and get results out. Enter DumpRenderTree.&lt;br /&gt;&lt;h2&gt;DumpRenderTree - Chrome without the chrome&lt;/h2&gt;&lt;div&gt;&lt;a href="http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree" target=""&gt;DumpRenderTree&lt;/a&gt; (DRT) is a great little tool hidden in the guts of &lt;a href="http://www.webkit.org/"&gt;WebKit&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;By default, DRT prints out an obscure text format representing the hierarchy of elements on the provided page.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Here's the output for &lt;code&gt;DumpRenderTree example/fract/fract_demo.html&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Content-Type: text/plain&lt;br /&gt;layer at (0,0) size 808x820&lt;br /&gt;  RenderView at (0,0) size 800x600&lt;br /&gt;layer at (0,0) size 800x820&lt;br /&gt;  RenderBlock {HTML} at (0,0) size 800x820&lt;br /&gt;    RenderBody {BODY} at (8,8) size 784x804&lt;br /&gt;      RenderHTMLCanvas {CANVAS} at (0,0) size 800x800 [bgcolor=#808080]&lt;br /&gt;      RenderText {#text} at (0,0) size 0x0&lt;br /&gt;#EOF&lt;br /&gt;#EOF&lt;/pre&gt;&lt;br /&gt;DRT is controlled mostly through Javascript in the test page by via &lt;code&gt;window.testRunner&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;Here's the script block that lives in &lt;code&gt;test/harness_browser.html&lt;/code&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;script&amp;gt;&lt;br /&gt;  &lt;span style="color: blue;"&gt;// only run if testRunner is defined -- we're in DRT&lt;/span&gt;&lt;br /&gt;  if (window.testRunner) {&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;// Don't dump the structure. Just the text of the output plus console output&lt;/span&gt;&lt;br /&gt;    testRunner.dumpAsText();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;// Don't finish when layout is done. Instead, wait to be notified&lt;/span&gt;&lt;br /&gt;    testRunner.waitUntilDone();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;// listen for messages from the test harness&lt;/span&gt;&lt;br /&gt;    window.addEventListener("message", receiveMessage, false);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;// listen for unhandled exceptions&lt;/span&gt;&lt;br /&gt;    window.addEventListener('error', onError);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: blue;"&gt;// if there is an unhandled exception, tell DRT we're done&lt;/span&gt;&lt;br /&gt;  function onError(event) {&lt;br /&gt;    testRunner.notifyDone();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: blue;"&gt;// if the test harness sends a done message, tell DRT we're done&lt;/span&gt;&lt;br /&gt;  function receiveMessage(event) {&lt;br /&gt;    if(event.data == 'unittest-suite-done') {&lt;br /&gt;      testRunner.notifyDone();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And since everything is keyed off the existence of &lt;code&gt;window.testRunner&lt;/code&gt;, none of this affects the behavior of tests running normally in a browser.&lt;br /&gt;&lt;br /&gt;Here's the first few lines of output from &lt;code&gt;DumpRenderTree test/harness_browser.html&lt;/code&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Content-Type: text/plain&lt;br /&gt;PASS&lt;br /&gt;All 109 tests passed&lt;br /&gt;Collapse All&lt;br /&gt;bot&lt;br /&gt; &lt;br /&gt;(4/4)&lt;br /&gt;bot - Enumerable&lt;br /&gt; &lt;br /&gt;(19/19)&lt;br /&gt;bot - Enumerable - group&lt;/pre&gt;&lt;br /&gt;Compare to the content running the tests in the browser:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-7w_EmaAPcYw/UQsyPjvYFAI/AAAAAAAAIIM/NYL4js5hnEk/s1600/Screen+Shot+2013-01-31+at+10.09.37+PM.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-7w_EmaAPcYw/UQsyPjvYFAI/AAAAAAAAIIM/NYL4js5hnEk/s1600/Screen+Shot+2013-01-31+at+10.09.37+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2&gt;Getting DumpRenderTree&lt;/h2&gt;&lt;div&gt;DRT is part of Linux and Windows builds of the Dart Editor now (look in the chromium) directory. It will be part of builds for Mac &lt;a href="https://code.google.com/p/dart/source/detail?r=17909"&gt;soon&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to get DRT that is compatible with the latest integration build of Dart - 0.3.2.0 (r17657) - grab &lt;a href="http://gsdview.appspot.com/dartium-archive/drt-mac-inc/drt-mac-inc-17651.0.zip"&gt;this guy&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just make sure the DumpRenderTree executable is on your path when running tests.&lt;/div&gt;&lt;h2&gt;Bringing it all together&lt;/h2&gt;&lt;div&gt;&lt;a href="http://drone.io/"&gt;drone.io&lt;/a&gt; supports DumpRenderTree for Dart projects. Read about it &lt;a href="http://docs.drone.io/dart.html"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The trick is creating a script that returns an exit code of zero for success and not zero (1 is pretty standard) for failure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check out the &lt;a href="https://github.com/kevmoo/bot.dart/blob/1b9e186f6234cfcf835a8596533eb660e50dbb22/bin/run_browser_test_drt.sh"&gt;script I created&lt;/a&gt; for BOT.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And let me know how it goes for you.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Happy hacking.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/JsigIxvMHHs" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 01 Feb 2013 03:29:00 +0000</pubDate>
	<author>noreply@blogger.com (Kevin Moore)</author>
<feedburner:origLink>http://work.j832.com/2013/01/headless-browser-testing-dart.html</feedburner:origLink></item>
<item>
	<title>On Dart (Dzenan Ridjanovic): Membership Web Components</title>
	<guid isPermaLink="false">http://dzenanr.github.com/2013/01/22/membership-web-components.html</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/2xY5kIVrOGI/membership-web-components.html</link>
	<description>I have created a simple membership application to explore web components in the Web UI package of Dart.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/2xY5kIVrOGI" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 22 Jan 2013 22:55:00 +0000</pubDate>
<feedburner:origLink>http://dzenanr.github.com/2013/01/22/membership-web-components.html</feedburner:origLink></item>
<item>
	<title>Kevin Moore: Dart Widgets Dev Journal 1 - Basic Animations</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2115056243892631308.post-4785090289915512420</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/Z7mq9MrBLY8/tldr-implementing-features-similar-to.html</link>
	<description>&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://kevmoo.github.com/widget.dart/" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-GziCm1MUz28/UPBNIGEa1KI/AAAAAAAAIFs/L2IPI__Zka4/s1600/Screen+Shot+2013-01-11+at+12.00.54+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;blockquote class="tr_bq"&gt;&lt;a href="http://en.wiktionary.org/wiki/TLDR"&gt;tl;dr&lt;/a&gt;: Implementing features similar to &lt;a href="http://twitter.github.com/bootstrap/"&gt;Bootstrap&lt;/a&gt; is hard without basic animation support in Dart. Basic animation support is not as easy as you'd think. &lt;a href="https://github.com/kevmoo/widget.dart"&gt;I've made a stab&lt;/a&gt;. &lt;a href="http://kevmoo.github.com/widget.dart/"&gt;Check out the demo&lt;/a&gt;.&lt;/blockquote&gt;I've started a new Dart project - &lt;a href="https://github.com/kevmoo/widget.dart/"&gt;Dart Widgets&lt;/a&gt;. The inspiration is &lt;a href="http://twitter.github.com/bootstrap/"&gt;Bootstrap&lt;/a&gt;, but with a focus on features that map cleanly to &lt;a href="https://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html"&gt;Web Components&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;While digging into Bootstrap, I realized that there was a heavy dependency on &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;--specifically the &lt;a href="http://api.jquery.com/category/effects/basics/"&gt;show/hide/toggle&lt;/a&gt; functionality. This is critical for expanders, menus, modals, pretty much everything.&lt;br /&gt;&lt;h2&gt;Show, hide, toggle&lt;/h2&gt;It turns out implementing show/hide/toggle is not as easy as one might guess.&lt;br /&gt;&lt;br /&gt;One could naively toggle &lt;code&gt;display: none;&lt;/code&gt; in an element's style attribute and call it a day, but a lot of edge cases would be missed.&lt;br /&gt;&lt;br /&gt;Throw in the ability to optionally animate the show/hide behavior and things get a lot more complicated.&lt;br /&gt;&lt;br /&gt;A short list of the cases to ponder:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Element with a non-standard display value. (e.g. a div inherited a display of inline-block)&lt;/li&gt;&lt;li&gt;Element with a local display of none &lt;/li&gt;&lt;li&gt;Element inherited a display of none&lt;/li&gt;&lt;li&gt;Show is called while an element is hiding and vice versa&lt;/li&gt;&lt;li&gt;Toggle is called 10 times before the first animation finishes&lt;/li&gt;&lt;li&gt;Show is called on an element with effect A while effect B is hiding it.&lt;/li&gt;&lt;/ul&gt;Huge props to the jQuery and jQuery-ui folks for tackling this problem. Their code served a great starting spot. I feel bad that they had to implement this logic in Javascript.&lt;br /&gt;&lt;h2&gt;Test&lt;/h2&gt;I can't tell you how valuable test-driven development was in getting this project off the ground. It would have been next to impossible to ensure all of the edge cases were handled cleanly.&lt;br /&gt;&lt;br /&gt;I need to write another post about how my approach to testing in Dart has evolved. Let's just say I didn't code up 939 tests by hand.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://github.com/kevmoo/widget.dart/"&gt;&lt;img border="0" height="476" src="http://3.bp.blogspot.com/--JP3TGuagMk/UPBOirhAPII/AAAAAAAAIF8/QiFrC-ZMmtY/s640/Screen+Shot+2013-01-11+at+12.28.41+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;After a lot of head scratching, I think I ended up with pretty clean, extensible model.&lt;br /&gt;&lt;br /&gt;As proof, I offer the &lt;a href="https://github.com/kevmoo/widget.dart/blob/b1cec11ff67cafe94a7c954f7e759b1211b1576f/lib/src/effects/css3_transition_effects.dart#L52"&gt;code&lt;/a&gt; for doing a open/close door effect:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;b&gt;class&lt;/b&gt; DoorEffect &lt;b&gt;extends&lt;/b&gt; Css3TransitionEffect {&lt;br /&gt;  DoorEffect() : &lt;b&gt;super&lt;/b&gt;(&lt;br /&gt;    '-webkit-transform',&lt;br /&gt;    'perspective(1000px) rotateY(90deg)',&lt;br /&gt;    'perspective(1000px) rotateY(0deg)',&lt;br /&gt;    {'-webkit-transform-origin': '0% 50%'}&lt;br /&gt;  );&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;There are still a few things I'd like to get working--&lt;a href="https://github.com/kevmoo/widget.dart/issues/8"&gt;get tests working in Firefox&lt;/a&gt;, &lt;a href="https://github.com/kevmoo/widget.dart/issues/7"&gt;find a way to handle browser prefixes cleanly&lt;/a&gt;--but generally I'm happy with progress.&lt;br /&gt;&lt;br /&gt;Check out the &lt;a href="http://kevmoo.github.com/widget.dart/"&gt;demo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Check out the &lt;a href="https://github.com/kevmoo/widget.dart/"&gt;code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Let me know what you think.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/Z7mq9MrBLY8" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 11 Jan 2013 17:50:00 +0000</pubDate>
	<author>noreply@blogger.com (Kevin Moore)</author>
<feedburner:origLink>http://work.j832.com/2013/01/tldr-implementing-features-similar-to.html</feedburner:origLink></item>
<item>
	<title>On Dart (Dzenan Ridjanovic): Test Model</title>
	<guid isPermaLink="false">http://dzenanr.github.com/2013/01/03/test-model.html</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/up9KL3Kenhs/test-model.html</link>
	<description>Edit a todo. Test the model.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/up9KL3Kenhs" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 03 Jan 2013 19:55:00 +0000</pubDate>
<feedburner:origLink>http://dzenanr.github.com/2013/01/03/test-model.html</feedburner:origLink></item>
<item>
	<title>Shailen Tuli: A first app with web components using Dart and Web UI library</title>
	<guid isPermaLink="false">http://shailen.github.com/blog/2012/12/31/a-first-app-with-web-components-using-dart</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/B4SlMnxbapE/</link>
	<description>&lt;p&gt;Its time to finally create a simple &lt;code&gt;hello world&lt;/code&gt; app using web components and
the dart Web UI library.&lt;/p&gt;

&lt;p&gt;There is already a ton of literature out there on why web components are a
tremendously good idea and I won’t try to do a huge ‘sell’ here.  If you are
completely new to web components, I can recommend
&lt;a href="http://blog.sethladd.com/2012/11/your-first-web-component-with-dart.html"&gt;this really good introductory blog post by Seth Ladd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or, if you are impatient, here’s an (almost) tweet sized summary: web components
allow developers to encapsulate their UI elements as easily reusable components.
You can define &lt;code&gt;templates&lt;/code&gt; with markup that is inert until activated later,
apply &lt;code&gt;decorators&lt;/code&gt; to enhance the look of those templates, create &lt;code&gt;custom
elements&lt;/code&gt; and play with the &lt;code&gt;shadow DOM&lt;/code&gt;. In this little app, we will not be
tikering with &lt;code&gt;decorators&lt;/code&gt; or the &lt;code&gt;shadow DOM&lt;/code&gt;; we &lt;em&gt;will&lt;/em&gt; be creating
&lt;code&gt;templates&lt;/code&gt; and defining our own &lt;code&gt;custom element&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The app is called &lt;code&gt;bookstore&lt;/code&gt; and you can find the code at
&lt;code&gt;https://github.com/shailen/bookstore&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Since I am new to web components and the Dart &lt;code&gt;Web UI&lt;/code&gt; library, I am going to
keep this simple. In its current iteration, the app will show the user the list
of books in the bookstore and let the user add books to the collection.
The plan is to start with something minimal and over the next few weeks and
months build something a little bit elaborate (add Authors, Publishers, more
attributes to our Book class, reviews, etc) while preserving the &lt;code&gt;one-page&lt;/code&gt; feel
of the app.&lt;/p&gt;

&lt;h2&gt;Important Files&lt;/h2&gt;

&lt;p&gt;There are a few important files in &lt;code&gt;bookstore&lt;/code&gt;’s web directory that are worth
discussing now:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;lib/models.dart&lt;/code&gt; contains code for a &lt;code&gt;Book&lt;/code&gt; class&lt;/p&gt;

&lt;p&gt;&lt;code&gt;web/books.html&lt;/code&gt; contains the basic markup for the app&lt;/p&gt;

&lt;p&gt;&lt;code&gt;web/books.dart&lt;/code&gt; contains the Dart code that goes with that markup&lt;/p&gt;

&lt;p&gt;&lt;code&gt;web/book_component.html&lt;/code&gt; contains the markup for our web component&lt;/p&gt;

&lt;p&gt;&lt;code&gt;web/book_component.dart&lt;/code&gt; contains the Dart code for our web component&lt;/p&gt;

&lt;p&gt;&lt;code&gt;build.dart&lt;/code&gt; helps use compile our code so that it can be run&lt;/p&gt;

&lt;p&gt;We’ll discuss each of these files in detail soon.&lt;/p&gt;

&lt;h2&gt;lib/models.dart&lt;/h2&gt;

&lt;p&gt;We’re going to be creating books. This file defines a simple &lt;code&gt;Book&lt;/code&gt; class. Our
books only have 1 attribute for now, a title (I told you this was simple ;).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;library models;

class Book {
  String title;
  Book(this.title);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;web/books.html&lt;/h2&gt;

&lt;p&gt;Here is the entirety of teh &lt;code&gt;web/books.html&lt;/code&gt; file. Consider this an entry point
into the app:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8"&amp;gt;
    &amp;lt;title&amp;gt;Books&amp;lt;/title&amp;gt;
    &amp;lt;link rel="components" href="book_component.html"&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;Books&amp;lt;/h1&amp;gt;

    &amp;lt;input id="new-book" type="text" placeholder="add another title"&amp;gt;
    &amp;lt;button on-click="createNewBook()"&amp;gt;Add Book&amp;lt;/button&amp;gt;

    &amp;lt;ul id="books"&amp;gt;
      &amp;lt;template iterate="book in books"&amp;gt;
        &amp;lt;x-book-item book="{{ book }}"&amp;gt;&amp;lt;/x-book-item&amp;gt;
      &amp;lt;/template&amp;gt;
    &amp;lt;/ul&amp;gt;

    &amp;lt;!-- this is the non web-component way to create the &amp;lt;li&amp;gt;s
    &amp;lt;ul&amp;gt;
      &amp;lt;template iterate='book in books'&amp;gt;
        &amp;lt;li&amp;gt;{{ book.title }}&amp;lt;/li&amp;gt;
      &amp;lt;/template&amp;gt;
    &amp;lt;/ul&amp;gt;
    --&amp;gt;

    &amp;lt;script type="application/dart" src="books.dart"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript" src="https://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A few things to notice here:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;link rel="components" href="book_component.html"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;is the way you access the contents of our web component from this file.&lt;/p&gt;

&lt;p&gt;We create an &lt;code&gt;input&lt;/code&gt; where the user enters the name of a book and an
accompanying &lt;code&gt;button&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;input id="new-book" type="text" placeholder="add another title"&amp;gt;
&amp;lt;button on-click="createNewBook()"&amp;gt;Add Book&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Notice the &lt;code&gt;on-click&lt;/code&gt;? That is the way we inline an event listener: when the
button is clicked, &lt;code&gt;createNewBook()&lt;/code&gt; fires (we’ll get to that function soon)&lt;/p&gt;

&lt;p&gt;And finally the code that actually deals with the web component:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;ul id="books"&amp;gt;
  &amp;lt;template iterate="book in books"&amp;gt;
    &amp;lt;x-book-item book="{{ book }}"&amp;gt;&amp;lt;/x-book-item&amp;gt;
  &amp;lt;/template&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A few things to note here. We define a &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; tag; we loop over our
collection of books (stored in a variable &lt;code&gt;books&lt;/code&gt; in &lt;code&gt;web/books.dart&lt;/code&gt;); we
instantiate our web component (&lt;code&gt;&amp;lt;x-book-item&amp;gt;&amp;lt;/x-book-item&amp;gt;&lt;/code&gt;) and we pass each
&lt;code&gt;book&lt;/code&gt; in the loop as a template variable when we instantiate the web component.&lt;/p&gt;

&lt;p&gt;There’s a lot going on here. Make sure you understand the above paragraph!&lt;/p&gt;

&lt;h2&gt;web/books.dart&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;web/books.html&lt;/code&gt; has a link to a Dart file at the bottom:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script type="application/dart" src="books.dart"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here is what &lt;code&gt;books.dart&lt;/code&gt; looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;import 'dart:html';
import 'package:bookstore/models.dart';

List&amp;lt;Book&amp;gt; books = [];

// binding created auto-magically!
void createNewBook() {
  var input = query("#new-book");
  books.add(new Book(input.value));
  input.value = "";
}

main() {
  // create some data so the page doesn't look empty
  ["War and Peace", "The Idiot", "Crime and Punishment"].forEach((title) {
    books.add(new Book(title));
  });
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It is pretty straightforward stuff: we import &lt;code&gt;models.dart&lt;/code&gt;, the file that
contains the &lt;code&gt;Book&lt;/code&gt; class; we create a &lt;code&gt;books&lt;/code&gt; variable to store our collection.
We define &lt;code&gt;createNewBook()&lt;/code&gt; to add a book to &lt;code&gt;books&lt;/code&gt;, and we define a &lt;code&gt;main()&lt;/code&gt;
function.&lt;/p&gt;

&lt;p&gt;This Dart file MUST contain a &lt;code&gt;main()&lt;/code&gt;, even an empty one will do.  In our case,
we will add a few books to our &lt;code&gt;books&lt;/code&gt; collection, so that there is some data to
display.&lt;/p&gt;

&lt;h2&gt;web/book_component.html&lt;/h2&gt;

&lt;p&gt;This contains the code that defines our web component:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;element name="x-book-item" constructor="BookComponent" extends="li"&amp;gt;
      &amp;lt;template&amp;gt; 
        &amp;lt;li&amp;gt;{{ book.title }}&amp;lt;/li&amp;gt;
      &amp;lt;/template&amp;gt;

      &amp;lt;script type="application/dart" src="book_component.dart"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/element&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A few things to understand here:  we create a custom &lt;code&gt;&amp;lt;element&amp;gt;&lt;/code&gt;; we give it a
name, &lt;code&gt;x-book-item&lt;/code&gt; (all element names must begin with an &lt;code&gt;x-&lt;/code&gt;); we call a
constructor, &lt;code&gt;BookComponent&lt;/code&gt; (defined in &lt;code&gt;web/book_componenet.dart&lt;/code&gt;, we’ll get
to that file shortly) and we declare that our custom element &lt;code&gt;extends&lt;/code&gt; and &lt;code&gt;li&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Inside our &lt;code&gt;&amp;lt;element&amp;gt;&lt;/code&gt;, we create a &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; that stores the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; that
contains a book’s title.&lt;/p&gt;

&lt;p&gt;And finally, we link to the accompanying Dart file, &lt;code&gt;book_component.dart&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;web/book_component.dart&lt;/h2&gt;

&lt;p&gt;Here we get to define our &lt;code&gt;BookComponent&lt;/code&gt; class (remember that we declared that
the &lt;code&gt;&amp;lt;element&amp;gt;&lt;/code&gt; we created in &lt;code&gt;book_componenet.html&lt;/code&gt; use this constructor?):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;import 'package:web_ui/web_ui.dart';
import 'package:bookstore/models.dart';

class BookComponent extends WebComponent {
  Book book;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;BookComponent&lt;/code&gt; extends &lt;code&gt;WebComponent&lt;/code&gt; (this is the only option for subclassing
at the moment; that may change in the future) and contains a &lt;code&gt;book&lt;/code&gt; attribute
(this can be set using the &lt;code&gt;book =&lt;/code&gt; syntax when the web component is
initialized). That’s it.&lt;/p&gt;

&lt;h2&gt;build.dart&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;import 'package:web_ui/component_build.dart';
import 'dart:io';

void main() {
  build(new Options().arguments, ['web/books.html']);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To actually build the project, &lt;code&gt;run&lt;/code&gt; &lt;code&gt;build.dart&lt;/code&gt; (this will create an &lt;code&gt;out&lt;/code&gt;
directory); then &lt;code&gt;run&lt;/code&gt;  &lt;code&gt;web/out/books.html&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;pubspec.yaml&lt;/h2&gt;

&lt;p&gt;The app only has a single &lt;code&gt;pub&lt;/code&gt; dependency, &lt;code&gt;web_ui&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;name: bookstore
description: A sample app to demonstrate the use of a web component

dependencies:
    web_ui
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Summary&lt;/h2&gt;

&lt;p&gt;This is a fair bit of code for a simple hello-world caliber app. Is all this web
component stuff really necessary, or is it overkill?&lt;/p&gt;

&lt;p&gt;We’re just starting out, so this may seem like too much of a production given
what the needs of our app. But we have already established a
pretty important development principle: our UI elements can be nicely
ENCAPSULATED (!) and then used as necessary. We have taken the first baby steps
towards creating a widget that displays the content of each book. As our
application grows in complexity, our ‘widget’ will become more elaborate and we
will want to use it in all sorts of different contexts in our app. A composable,
encapsulated UI component - a web component - that can be instantiated with
varying arguments will then prove to be quite useful.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/B4SlMnxbapE" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 01 Jan 2013 01:54:00 +0000</pubDate>
<feedburner:origLink>http://shailen.github.com/blog/2012/12/31/a-first-app-with-web-components-using-dart/</feedburner:origLink></item>
<item>
	<title>Shailen Tuli: setting up continuous integration for dart using drone.io</title>
	<guid isPermaLink="false">http://shailen.github.com/blog/2012/12/31/setting-up-continuous-integration-for-dart-using-drone-io</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/eB2L5GRQBVU/</link>
	<description>&lt;h2&gt;Creating a dummy project&lt;/h2&gt;

&lt;p&gt;I created a very simple project, &lt;code&gt;droneDemo&lt;/code&gt;, to show how to set up Continuous Integration
on drone.io for Dart projects. The code can be found &lt;a href="https://github.com/shailen/droneDemo"&gt;here on Github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;droneDemo&lt;/code&gt; defines just two methods, &lt;code&gt;add()&lt;/code&gt; and &lt;code&gt;multiply()&lt;/code&gt;. These
can be found in &lt;code&gt;lib/&lt;/code&gt;. Tests for these methods can be found in &lt;code&gt;test/&lt;/code&gt;. The
&lt;code&gt;pubspec.yaml&lt;/code&gt; file needs to declare a &lt;code&gt;unittest&lt;/code&gt; dependency for these tests to
work.&lt;/p&gt;

&lt;p&gt;This is about as simple a project as you can have and there is little need for
explanation. But it is worth delving into 2 points:&lt;/p&gt;

&lt;p&gt;1) You should add &lt;code&gt;packages&lt;/code&gt; to your &lt;code&gt;.gitignore&lt;/code&gt;. This is to tell &lt;code&gt;git&lt;/code&gt; not to
commit the &lt;code&gt;symlinks&lt;/code&gt; created by &lt;code&gt;pub&lt;/code&gt; to version control. These symlinks are
meaningful in the context of your filesystem but will trip drone.io.&lt;/p&gt;

&lt;p&gt;If you already started your demo project and ended up with the symlinks, remove
them.&lt;/p&gt;

&lt;p&gt;2) drone.io needs a way to run all your tests. So far, Dart does not ship with a
test runner, so you’ll have to cobble together something yourself.&lt;/p&gt;

&lt;p&gt;Here’s what I did: my tests live in 2 different files, &lt;code&gt;test/add_test.dart&lt;/code&gt; and
&lt;code&gt;test/multiply_test.dart&lt;/code&gt;. I declared both files as libraries (see the &lt;code&gt;library add_test;&lt;/code&gt;
and the &lt;code&gt;library multiply_test;&lt;/code&gt; declaration at the top of each file) and
&lt;code&gt;import&lt;/code&gt;ed  components from them into &lt;code&gt;test/test_runner.dart&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;   import “package:unittest/unittest.dart”;
   import “add_test.dart” as add_test;
   import “multiply_test.dart” as multiply_test;&lt;/p&gt;

&lt;p&gt;   void main() {&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; add_test.main();
 multiply_test.main();
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;   }&lt;/p&gt;

&lt;p&gt;So, calling &lt;code&gt;dart test/add_test.dart&lt;/code&gt; or &lt;code&gt;dart test/multiply_test.dart&lt;/code&gt; runs
only one test; calling &lt;code&gt;dart/test_runner.dart&lt;/code&gt; runs both the tests.&lt;/p&gt;

&lt;p&gt;With this out of the way, we can shift our attention to drone.io.&lt;/p&gt;

&lt;h2&gt;Drone.io: Basic Setup&lt;/h2&gt;

&lt;p&gt;Set up account at &lt;code&gt;https://drone.io/signup&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On your &lt;code&gt;dashboard&lt;/code&gt;, click on the &lt;code&gt;New Project&lt;/code&gt; on the top right.&lt;/p&gt;

&lt;p&gt;Pick &lt;code&gt;Dart&lt;/code&gt; as the project language.&lt;/p&gt;

&lt;p&gt;Pick &lt;code&gt;Git&lt;/code&gt; as your Repository type.&lt;/p&gt;

&lt;p&gt;Add the project name (I added &lt;code&gt;droneDemo&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Add the Repository URL (mine was &lt;code&gt;https://github.com/shailen/droneDemo.git&lt;/code&gt;).
Make sure your github repo is set to use the &lt;code&gt;http&lt;/code&gt; method, not the &lt;code&gt;ssh&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;Create&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;Configuring your Build&lt;/h2&gt;

&lt;p&gt;After you press &lt;code&gt;Create&lt;/code&gt;, you will be redirected to the &lt;code&gt;script/config&lt;/code&gt; page.
Here, you will have to tell drone.io how to run your tests.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;Commands&lt;/code&gt; section, type the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pub install
dart test/test_runner.dart
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Remember &lt;code&gt;test/test_runner.dart&lt;/code&gt; was our consolidating test runner? This is
where the trouble we went through sewing our tests together pays off.&lt;/p&gt;

&lt;p&gt;Press &lt;code&gt;Save&lt;/code&gt; and when you get the message that tells you the build was
successfully saved, press the blue &lt;code&gt;Build Now&lt;/code&gt; button at the top.&lt;/p&gt;

&lt;p&gt;A popup will appear with a &lt;code&gt;Build Output&lt;/code&gt; link.  Click that link.&lt;/p&gt;

&lt;p&gt;Voila! You are swimming in a sea of green!&lt;/p&gt;

&lt;p&gt;&lt;img src="http://shailen.github.com/images/drone_io_success.png" /&gt;&lt;/p&gt;

&lt;p&gt;My build output can be seen at: &lt;code&gt;https://drone.io/shailen/droneDemo/1&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;Setting up Continuous Build&lt;/h2&gt;

&lt;p&gt;Click on &lt;code&gt;settings&lt;/code&gt; for your &lt;code&gt;drone.io&lt;/code&gt; project&lt;/p&gt;

&lt;p&gt;Click on &lt;code&gt;General&lt;/code&gt; in the left column. You will see a couple of links under &lt;code&gt;Build Hooks&lt;/code&gt;. Copy the top one.&lt;/p&gt;

&lt;p&gt;Now, go back to your project on &lt;code&gt;github&lt;/code&gt;. Mine is at &lt;code&gt;https://github.com/shailen/droneDemo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Click on &lt;code&gt;Settings&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Click on &lt;code&gt;Service Hooks&lt;/code&gt; (left column).&lt;/p&gt;

&lt;p&gt;Click on the &lt;code&gt;WebHook Urls&lt;/code&gt; link at the top.&lt;/p&gt;

&lt;p&gt;Paste the &lt;code&gt;build hook&lt;/code&gt; you had copied earlier in the text input box provided
and press &lt;code&gt;Update Settings&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;From now on, every time you commit to your project on github, drone.io will run
all your tests.&lt;/p&gt;

&lt;p&gt;I changed one of my tests so that it was failing and pushed to github. No
surprise, the build now show &lt;code&gt;Failed&lt;/code&gt; (&lt;code&gt;https://drone.io/shailen/droneDemo&lt;/code&gt;).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/eB2L5GRQBVU" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 31 Dec 2012 22:58:00 +0000</pubDate>
<feedburner:origLink>http://shailen.github.com/blog/2012/12/31/setting-up-continuous-integration-for-dart-using-drone-io/</feedburner:origLink></item>
<item>
	<title>Dart: Terra Incognita (Ladislav Thon): Surprise me!</title>
	<guid isPermaLink="false">http://ladicek.github.com/2012/12/24/surprise-me</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/zm7jCCk4KTg/surprise-me.html</link>
	<description>&lt;p&gt;Looks like I’m clearly unable to write often (or at least more often :-) ), so I’ll instead try to focus on interesting stuff. Today, let’s take a look at some features in Dart that might be surprising. And since I wrote about the &lt;em&gt;cool&lt;/em&gt; features earlier, today I’ll write about those that are … not so cool. Or &lt;em&gt;bad&lt;/em&gt;, actually. Yes, each programming language that tries to hit the mainstream has to make compromises, which obviously leads to some kind of &lt;em&gt;language smell&lt;/em&gt; (is there such a thing?). And Dart has particularly bad starting position, because it wants to compile to efficient JavaScript – and that is really huge constraint. So here comes the disclaimer: I’m writing this to point out some potential pain points, not to offend anyone (and especially not to say that Dart is bad, other languages would have much longer list!). Always remember the constraints Dart needs to fit into when judging.&lt;/p&gt;

&lt;p&gt;All that said, let’s start.&lt;/p&gt;

&lt;h2 id="strings"&gt;Strings&lt;/h2&gt;

&lt;p&gt;What? Oh yeah, strings. Strings in Dart used to be &lt;em&gt;sequences of Unicode code points&lt;/em&gt;. If that doesn’t make sense to you, that’s fine, it doesn’t have to. It essentially means that strings were comprised of characters. This was even in the M1 version of the specification (0.12).&lt;/p&gt;

&lt;p&gt;It isn’t true anymore. It was changed, as you can find in &lt;a href="http://code.google.com/p/dart/source/detail?r=14357"&gt;revision 14357&lt;/a&gt; and in the M2 version of the spec (0.20). Right now, strings are &lt;em&gt;sequences of UTF-16 code units&lt;/em&gt;. What does that mean? If you imagine a string as a sequence of integers (which it essentially is, under the hood), the original version meant that single character was always represented by a single integer (Dart VM was clever about it and if all the characters fit into 8-bit integers, it used 8-bit integers for that; if not, then maybe 16-bit integers, and if even that wasn’t enough, then 32-bit integers). And this isn’t correct anymore – single character can still be a single integer (when the character belongs to the &lt;a href="http://en.wikipedia.org/wiki/Unicode_plane"&gt;Basic Multilingual Plane&lt;/a&gt;), but it can also be two integers (characters from Supplementary Planes). These two integers together form a so called &lt;em&gt;surrogate pair&lt;/em&gt;, and everytime you work with strings, you need to remember about them. Which is obviously a major source of programming errors – and I honestly believe that programmers making these errors shouldn’t be blamed. Who is guilty is the Unicode Consortium, which created the major abomination that UTF-16 is. It should really never have seen the light of day.&lt;/p&gt;

&lt;p&gt;But sadly, it’s here witht us, and a lot of legacy software use it (Java, JavaScript, WebKit etc.). I was very sad to see this coming to Dart as well, but it was necessary for two reasons: compilation to JavaScript (otherwise Dart would need to implement strings on its own, which would probably perform badly) and integration of Dart VM with WebKit (before this change, each interaction with the DOM resulted in string conversions, again hurting performance).&lt;/p&gt;

&lt;h2 id="integers"&gt;Integers&lt;/h2&gt;

&lt;p&gt;Not really?! Oh yes. Dart has &lt;em&gt;arbitrary precision integers&lt;/em&gt;, which is a very cool thing (you can work with arbitrarily big integers, as long as they fit into the heap) and also a big pain when compiling to JavaScript. You see, JavaScript only has &lt;em&gt;one&lt;/em&gt; numeric type – double precision floating point (see &lt;a href="http://en.wikipedia.org/wiki/IEEE_floating_point"&gt;IEEE 754&lt;/a&gt;). Which means that Dart &lt;code&gt;double&lt;/code&gt;s map naturally to JavaScript &lt;code&gt;number&lt;/code&gt;s, but Dart &lt;code&gt;int&lt;/code&gt;s must somehow be implemented on top of them. And this implementation … is incomplete right now. It is probably the biggest difference between native Dart VM and Dart compiled to JavaScript, so take care.&lt;/p&gt;

&lt;h2 id="booleans"&gt;Booleans&lt;/h2&gt;

&lt;p&gt;Now I’m surely kidding, right?! No, I’m not. Dart has a distinct &lt;code&gt;bool&lt;/code&gt; type with two values, &lt;code&gt;true&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt;, all nice and dandy, but it also features a &lt;em&gt;boolean conversion&lt;/em&gt;. That is an infamous thing in a lot of dynamic programming languages, even those strongly typed, and I’d argue that it’s essentially bad. But in most languages that have it, it is actually useful – truthy and falsy values just make sense (the number zero, empty string, null, maybe empty list or map, all those can be used as a falsy value, anything else is truthy). Not in Dart. Dart only has one truthy value – the object &lt;code&gt;true&lt;/code&gt;. Everything else is &lt;code&gt;false&lt;/code&gt;. Which essentially means that the boolean conversion is useless – but it’s still there (apparently because it makes compilation to JavaScript easier). Just forget about it and you’ll be safe, but I’d wish it just disappeared. It doesn’t make any sense.&lt;/p&gt;

&lt;h2 id="collections"&gt;Collections&lt;/h2&gt;

&lt;p&gt;Am I trying to say something terrible about each of the basic types? I’m not, it just so happens. What is the problem with &lt;code&gt;Collection&lt;/code&gt;s? Their equality (and hash code). Or actually, the &lt;em&gt;lack&lt;/em&gt; thereof.&lt;/p&gt;

&lt;p&gt;If you think about it for a minute, it’s actually pretty hard to sensibly define equality and hash code for lists that can change its content during their lifetime. (What if you put an object to a map and use a mutable list as a key? If you later change that list, you won’t be able to use it again to lookup the object back from the map.) So Dart library designers decided not to base equality and hash code of collections on their content, but only on their identity. It has one tiny drawback, though: &lt;code&gt;1 == 1&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, but &lt;code&gt;[1] == [1]&lt;/code&gt; isn’t. That’s just plain wrong. The same applies to maps and sets.&lt;/p&gt;

&lt;p&gt;Luckily, the library will probably contain functions to compare collections according to their content. So that’s at least something.&lt;/p&gt;

&lt;h2 id="nulls"&gt;Nulls&lt;/h2&gt;

&lt;p&gt;That’s a joke, really. &lt;code&gt;null&lt;/code&gt; is just fine in Dart. It doesn’t even throw the infamous &lt;code&gt;NullPointerException&lt;/code&gt; but the nice old &lt;code&gt;NoSuchMethodError&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Oh, and Merry Christmas to all Dartisans! :-)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/zm7jCCk4KTg" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 24 Dec 2012 08:00:00 +0000</pubDate>
<feedburner:origLink>http://ladicek.github.com/2012/12/24/surprise-me.html</feedburner:origLink></item>
<item>
	<title>Shailen Tuli: Randomness in Dart: nextBool(), nextInt(), and nextDouble()</title>
	<guid isPermaLink="false">http://shailen.github.com/blog/2012/12/10/random-dart-nextbool-nextint-and-nextdouble</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/xVISh94zPyk/</link>
	<description>&lt;p&gt;The &lt;code&gt;Random&lt;/code&gt; class in &lt;code&gt;dart:math&lt;/code&gt; contains 3 methods, &lt;code&gt;nextBool()&lt;/code&gt;, &lt;code&gt;nextInt()&lt;/code&gt;
and &lt;code&gt;nextDouble()&lt;/code&gt;. To use &lt;code&gt;Random&lt;/code&gt;, you will need a &lt;code&gt;import 'dart:math&lt;/code&gt; in your
code.&lt;/p&gt;

&lt;h2&gt;nextBool()&lt;/h2&gt;

&lt;p&gt;simply returns &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; at random. Here is a little
function, &lt;code&gt;randUpcase()&lt;/code&gt; that demonstrates &lt;code&gt;randBool()&lt;/code&gt; use. &lt;code&gt;randUpcase()&lt;/code&gt;
takes a string as an argument, and converts each character in the string to
uppercase if random.nextBool() is &lt;code&gt;true&lt;/code&gt; and leaves it untouched if it is
&lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;String randUpcase(String s) {
  Random random = new Random();
  List&amp;lt;String&amp;gt; chars = s.split('');
  return Strings.join(chars.map(
    (char) =&amp;gt; random.nextBool() ? char.toUpperCase() : char), '');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here is some sample usage:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var herbs = ["parsley", "sage", "rosemary", "thyme"];
print(herbs.map((herb) =&amp;gt; randUpcase(herb))); // [pARslEY, SaGE, roSEMaRY, tHYME]
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;nextInt()&lt;/h2&gt;

&lt;p&gt;takes a &lt;code&gt;max&lt;/code&gt; int argument and generates a positive int between 0 (inclusive) and &lt;code&gt;max&lt;/code&gt;, exclusive.&lt;/p&gt;

&lt;p&gt;To generate a random int within a range, you can do something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;int randRange(int min, int max) {
  var random = new Random();
  return min + random.nextInt(max - min);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can also use &lt;code&gt;nextInt()&lt;/code&gt; to randomly shuffle a list (using the familiar
Fisher-Yates-Knuth algorithm):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;List shuffle(List items) {
  var random = new Random();
  for (var i = items.length - 1; i &amp;gt; 0; i--) {
    var j = random.nextInt(i);
    var temp = items[i];
    items[i] = items[j];
    items[j] = temp;
  }
  return items;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can use it like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var items = ["fee", "fi", "fo", "fum", "smell", "Englishman"];
print(shuffle(items)); // [fo, smell, fum, Englishman, fee, fi]
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;nextDouble()&lt;/h2&gt;

&lt;p&gt;generates a random floating point value distributed between 0.0
and 1.0. Here is a little function to simulate a biased coin toss; the &lt;code&gt;percent&lt;/code&gt;
argument alters the percent a coin will return heads (‘H’). This is pretty much cribbed from
&lt;a href="http://stackoverflow.com/questions/477237/how-do-i-simulate-flip-of-biased-coin-in-python"&gt;this discussion on Stack Overflow&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;String flip(num percent) {
  Random random = new Random();
  return random.nextDouble() &amp;lt; percent ? 'H' : 'T';
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here is some code to test that it works:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;int n = 1000;
int heads = 0;
for (var i = 0; i &amp;lt; 1000; i++) {
  if(flip(.20) == "H") heads++;
}
print(heads/n); // 0.209, 0.196, etc.
&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/xVISh94zPyk" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 10 Dec 2012 22:36:00 +0000</pubDate>
<feedburner:origLink>http://shailen.github.com/blog/2012/12/10/random-dart-nextbool-nextint-and-nextdouble/</feedburner:origLink></item>
<item>
	<title>Dart: Terra Incognita (Ladislav Thon): Getting Dart from Git</title>
	<guid isPermaLink="false">http://ladicek.github.com/2012/12/08/getting-dart-from-git</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/OWyi9yUBeZU/getting-dart-from-git.html</link>
	<description>&lt;p&gt;I originally started to write this as a post on Google+, but I quickly found out that it’s a little longer and that it maybe warrants a full blog post. Here it is.&lt;/p&gt;

&lt;p&gt;A small confession first: I have always been frustrated with building Dart from source.&lt;/p&gt;

&lt;p&gt;First, Subversion is dead. Noone can expect me to participate on a project with Subversion. I want git and I want it now. Fortunately, the official page with &lt;a href="https://code.google.com/p/dart/wiki/GettingTheSource"&gt;instructions for getting the source&lt;/a&gt; also mentions &lt;code&gt;git svn&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Second, &lt;code&gt;git svn&lt;/code&gt; is a terrible idea. Every now and then, &lt;code&gt;git svn fetch &amp;amp;&amp;amp; git
merge git-svn&lt;/code&gt; ended horribly for me and I really couldn’t repair the checkout. Luckily, we have two git mirrors of Dart: the &lt;a href="http://git.chromium.org/gitweb/?p=external/dart/bleeding_edge.git;a=summary"&gt;primary one in Chromium Git repository&lt;/a&gt; and even &lt;a href="https://github.com/dart-lang/bleeding_edge"&gt;one on GitHub&lt;/a&gt; (which is actually mirrored from the Chromium Git repository).&lt;/p&gt;

&lt;p&gt;Third, Dart uses Google-specific tools for getting dependencies (Depot Tools) and building the code (GYP for generating makefiles + some hand-written scripts to invoke them). And in case of Dart, their configuration expects the SVN structure. Which means that if I clone Dart repo from one of those Git mirrors, I’m screwed. The structure doesn’t match. I have to live with those tools somehow, if I don’t want to create a new build system for Dart (which I don’t).&lt;/p&gt;

&lt;p&gt;I got really fed up with this and spent few hours today (yes, &lt;em&gt;hours!&lt;/em&gt;) trying to make a stream-lined process for getting Dart from Git and building it without issues, without higher-order wizardry and without special custom scripts. And I believe I’ve got one. Only a single, one-time, small and localized change… not bad. Here’s the process.&lt;/p&gt;

&lt;h3 id="initial_setup"&gt;Initial setup&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;git clone https://git.chromium.org/git/external/dart/bleeding_edge.git repo&lt;/code&gt; (if you forked Dart on GitHub, use a GitHub URL)&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;code&gt;cd repo&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;code&gt;gclient config http://dart.googlecode.com/svn/branches/bleeding_edge/deps/all.deps&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;The previous command will create a &lt;code&gt;.gclient&lt;/code&gt; file with a tiny configuration. Make this small change:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; @@ -4,6 +4,7 @@
      "deps_file"   : "DEPS",
      "managed"     : True,
      "custom_deps" : {
 +      "dart": None
      },
      "safesync_url": "",
    },&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Doing this, I’m overriding one of the instructions in the original &lt;code&gt;DEPS&lt;/code&gt; file that says to clone the &lt;code&gt;dart&lt;/code&gt; directory from SVN. I don’t need to do that, I’ve already got it from Git. All the other dependencies will still get cloned from SVN, but I don’t really care about those.&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;&lt;code&gt;gclient sync&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id="everytime_i_want_to_update"&gt;Everytime I want to update&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;repo&lt;/code&gt; directory:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;git pull&lt;/code&gt; (or &lt;code&gt;git fetch&lt;/code&gt; and &lt;code&gt;git merge&lt;/code&gt;, you know know the drill)&lt;/li&gt;

&lt;li&gt;&lt;code&gt;gclient sync &amp;amp;&amp;amp; gclient runhooks&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id="building_it_is_simple_then"&gt;Building it is simple then&lt;/h3&gt;

&lt;p&gt;Just run &lt;code&gt;./tools/build.py&lt;/code&gt; in the &lt;code&gt;repo/dart&lt;/code&gt; directory. No changes in this.&lt;/p&gt;

&lt;p&gt;I wish I wouldn’t have to do all the crazy dance, but I think I can live with it. Nice thing is that this procedure is pretty similar to the official one.&lt;/p&gt;

&lt;p&gt;P.S.: for easier work, I just added these entries to &lt;code&gt;.git/info/exclude&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/.gclient
/.gclient_entries
/all.deps/&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/OWyi9yUBeZU" height="1" width="1"/&gt;</description>
	<pubDate>Sat, 08 Dec 2012 08:00:00 +0000</pubDate>
<feedburner:origLink>http://ladicek.github.com/2012/12/08/getting-dart-from-git.html</feedburner:origLink></item>
<item>
	<title>Shailen Tuli: Running Only Some of Your Dart Tests with filterTests()</title>
	<guid isPermaLink="false">http://shailen.github.com/blog/2012/12/07/running-only-some-of-your-tests</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/iyik9HUmHiA/</link>
	<description>&lt;p&gt;The Dart &lt;code&gt;unittest&lt;/code&gt; library allows you to run just a single test; to do so,
just change the call for that test form &lt;code&gt;test()&lt;/code&gt; to &lt;code&gt;solo_test()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Another way to run a subset of your tests is by using the &lt;code&gt;filterTests()&lt;/code&gt;
function. &lt;code&gt;filterTests()&lt;/code&gt; takes a String or a RegExp argument and matches
it against each test description; if the description matches, the test
runs, otherwise, it doesn’t.&lt;/p&gt;

&lt;p&gt;Before you use &lt;code&gt;filterTests()&lt;/code&gt;, you need to disable the automatic running of
tests (set &lt;code&gt;autoStart&lt;/code&gt; to false) and ensure that the your configuration is
initialized.&lt;/p&gt;

&lt;p&gt;You can do this by creating a custom configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;import "package:unittest/unittest.dart";
import "package:args/args.dart";

class FilterTests extends Configuration {
  get autoStart =&amp;gt; false;
}

void useFilteredTests() {
  configure(new FilterTests());
  ensureInitialized();  
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, you can call &lt;code&gt;useFilteredTests()&lt;/code&gt; in your &lt;code&gt;main()&lt;/code&gt;, define all your
tests, call &lt;code&gt;filteredTests()&lt;/code&gt; with a string or regexp argument and run your
tests using &lt;code&gt;runTests()&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;void main() {
  useFilteredTests();

  // your tests go here

  filterTests(some_string_or_regexp);
  runTests();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is a little working example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;void main() {
  useFilteredTests();

  test("one test", () {
    expect(1, equals(1));
  }); 

  test("another test", () {
    expect(2, equals(2));
  });

  test("and another", () {
    expect(3, equals(3));
  });

  filterTests('test');
  // filterTests('another');

  runTests();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;filterTests('test')&lt;/code&gt; will run the first 2 tests; &lt;code&gt;filterTests('another')&lt;/code&gt; will
run the last 2 tests.&lt;/p&gt;

&lt;p&gt;It is easy to make this &lt;em&gt;considerably&lt;/em&gt; more useful by getting the argument to
&lt;code&gt;filterTests()&lt;/code&gt; from the command line. That way, you can control what subset of
tests to run without having to change the code in your test suite. Here is a
slightly expanded version of the same example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;void main() {
  useFilteredTests();
  ArgParser argParser = new ArgParser();
  Options options = new Options();
  ArgResults results = argParser.parse(options.arguments);
  List&amp;lt;String&amp;gt; args = results.rest; // get the args from the command line

  test("one test", (){
    expect(1, equals(1));
  }); 

  test("another test", (){
    expect(2, equals(2));
  });

  test("and another", (){
    expect(3, equals(3));
  });

  // we add a group() to show how we can easily run just the tests
  // contained in it
  group("foo", () {
    test("this", (){
      expect('bar', equals('bar'));
    }); 

    test("that", (){
      expect('baz', equals('baz'));
    });
  });

  if (!args.isEmpty) {
    filterTests(args[0]);
  }
  runTests();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can run the tests from the command line by using the&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;`dart name_of_file.dart [keyword]`
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;syntax. If the keyword is &lt;code&gt;this&lt;/code&gt;, only one test will run. If the keyword is
&lt;code&gt;foo&lt;/code&gt;, all tests in the &lt;code&gt;group()&lt;/code&gt; with the description of &lt;code&gt;foo&lt;/code&gt; will run.
If you do not provide a keyword, all 5 tests will run.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/iyik9HUmHiA" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 07 Dec 2012 18:00:00 +0000</pubDate>
<feedburner:origLink>http://shailen.github.com/blog/2012/12/07/running-only-some-of-your-tests/</feedburner:origLink></item>
<item>
	<title>Christian Grobmeier: Dart talk in Stuttgart – the Slides</title>
	<guid isPermaLink="false">http://www.grobmeier.de/?p=1792</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/5dMTmoZFIjM/dart-talk-stuttgart-slides-26112012.html</link>
	<description>&lt;p&gt;On 22.11.2012 I was guest of the &lt;a href="http://jugs.de/" target="_blank"&gt;Java Usergroup in Stuttgart&lt;/a&gt;. It was a fun evening, with a lot of discussion on &lt;a href="http://www.dartlang.org" target="_blank" title="Dart Website"&gt;Dart&lt;/a&gt;. Here are the slides which I used:&lt;/p&gt;
&lt;p&gt; 
&lt;/p&gt;&lt;div style="margin-bottom: 5px;"&gt; &lt;strong&gt; &lt;a href="http://www.slideshare.net/christiangrobmeier/dart-javascript" target="_blank" title="Dart != JavaScript"&gt;Dart != JavaScript&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="http://www.slideshare.net/christiangrobmeier" target="_blank"&gt;Christian Grobmeier&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
&lt;h2&gt;What have I learned from that evening?&lt;/h2&gt;
&lt;h3&gt;Not everybody likes JavaScript&lt;/h3&gt;
&lt;p&gt;First, &lt;strong&gt;there are still a lot of people who don’t like JavaScript&lt;/strong&gt;. OK, I asked Java developers who are not known for their love to JavaScript. But after all, this group contains a lot of people. Some might say, they have not understood JavaScript very well and can’t judge. Well, that might be true. But this is not what counts. People often don’t have the time, the energy or the budget to learn things for which they need to make a complete refactoring of their minds. And this is often the case if you have programmed Java for a long while and suddenly turn to JavaScript. It happened to me back then, I know what I am speaking of.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JavaScript has its benefits&lt;/strong&gt; – I myself like JavaScript meanwhile (except the quirks of course). I have invested a lot of time to learn about it. Still I am not a master, but I can survive. That’s fine. But it took me a lot of time and sometimes I was near to grief. Lucky me, I have found Stoyan Stefanovs excellent book “&lt;a href="http://amzn.to/V6m9g7" target="_blank"&gt;JavaScript Design Patterns&lt;/a&gt;” which is not only well written but also helped me to really get started.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dart addresses the heavy learning curve&lt;/strong&gt;. It seemed to me the audience liked the new flexibility which comes with Dart, compared to Java. And that they could still think in “old patterns” and use for example Classes. And that the syntax was so freaking familiar.&lt;/p&gt;
&lt;h3&gt;People don’t like experiments so much&lt;/h3&gt;
&lt;p&gt;Second, people were concerned &lt;strong&gt;whether Dartlang is an approach one needs to follow or if is just an experiment among thousand others&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;JavaScript is everywhere. Why should one learn about Dart? It is easy to learn but you still need to read some docs and play around with the language – it costs you time. &lt;/p&gt;
&lt;p&gt;There is a &lt;strong&gt;dart2js compiler, which lets you build your Apps right now&lt;/strong&gt;. If Dart would become accepted by the masses is unknown to me. But I suspect there will be something “happen” in combination with Android.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://plus.google.com/109601534018793668119/posts/VNVko1DaLQF" target="_blank"&gt;Jochen Wiedmann&lt;/a&gt; summed up what I think on Android thing:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
Had the pleasure to attend an interesting talk, organized by +JUG Stuttgart and given by +Christian Grobmeier on #Dart . Most appealing, in particular, a theory proposed by Christian: In order to resolve the chicken and egg problem that Dart’s not in widespread use, because the Browsers don’t support it natively, and vice versa, (and for a number of other reasons), Google might make Dart a first-class-citizen of Android: In other words, create a bridge between Dart and Dalvik that would allow to write Android Apps in Dart.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Well, that MIGHT be true. But I am not a Googler nor do I have insider information. It just makes… sense.&lt;/p&gt;
&lt;p&gt;Using dart2js is not so elegant as running Dart in a native browser VM. With &lt;a href="http://grobmeier.github.com/Roadcrew.js/" target="_blank"&gt;Roadcrew.js&lt;/a&gt; I found out that the generated JavaScript would take 200kb space, while writing JavaScript on my own + the jQuery library would only take only 100kb. &lt;/p&gt;
&lt;p&gt;But Dart is still young and dart2js will optimize with time. And for just 100kb more (web fetishists will say its unbelievable huge and not acceptable) &lt;strong&gt;you get readable, maintainable code with great tooling which even the Java developers in your team can understand&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div class="wp-caption alignright" id="attachment_1793" style="width: 310px;"&gt;&lt;a href="http://www.grobmeier.de/wp-content/uploads/2012/11/jugs.jpg?9d7bd4"&gt;&lt;img alt="Java Usergroup Stuttgart - Dart Talk" class="size-medium wp-image-1793" height="225" src="http://www.grobmeier.de/wp-content/uploads/2012/11/jugs-300x225.jpg?9d7bd4" title="Java Usergroup Stuttgart" width="300" /&gt;&lt;/a&gt;&lt;p class="wp-caption-text"&gt;Java Usergroup Stuttgart – Dart Talk&lt;/p&gt;&lt;/div&gt;At the moment I do not use Dart in production. It is still changing to much. While the base syntax might be “pretty” stable, the libraries are undergoing a refactoring at the time of this writing which last for – i am guessing – 1 year or so. But once Dart is stable, I will surely start using it in production. Let us hope it this date is not so far away.&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;A nice evening&lt;/h2&gt;
&lt;p&gt;All speculations. What is real and fact: the evening was nice! The whole usergroup is organized in an excellent way. You would even get some snacks. And the location is wonderful. I simply decided that I will need to visit this beautiful city at daylight. Here is an unsharp photo of it. Sorry, but my Android phone wouldn’t make it better. For sure I will visit Stuttgart again – it is a great community over there.&lt;/p&gt;
&lt;p&gt;NOTE: I have been asked if there was only one or two persons attending. That photo has been taken BEFORE the talk &lt;img alt=":-)" class="wp-smiley" src="http://www.grobmeier.de/wp-includes/images/smilies/icon_smile.gif?9d7bd4" /&gt;  In fact, around 40 people were there.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/5dMTmoZFIjM" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 26 Nov 2012 08:32:31 +0000</pubDate>
<feedburner:origLink>http://www.grobmeier.de/dart-talk-stuttgart-slides-26112012.html</feedburner:origLink></item>
<item>
	<title>John Evans: Buckshot Now Supports Namespaces</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-5241411837426252509.post-8084525898948721790</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/BqEDCPh-y-o/buckshot-now-supports-namespaces.html</link>
	<description>Following on the recent mini-announcement on G+ that Buckshot &lt;a href="https://plus.google.com/b/105133271658972815666/105133271658972815666/posts/FxwwGdsKG2P" target="_blank"&gt;is now a multi-platform library &lt;/a&gt;, I'm happy to also announce that Buckshot templates now support namespaces (in fact they require it).  Using namespaces provides several benefits: &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Better visual identification of the template's target platform.&lt;/li&gt;&lt;li&gt;Element name collision avoidance.&lt;/li&gt;&lt;li&gt;The framework can better help identify misuse of elements within a template (namespace mismatch).&lt;/li&gt;&lt;li&gt;Sets up eventual support for multi-platform targetting withing the same application (HTML + SVG for example).&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Introducing the "Template" Element&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;The addition of namespaces also introduces a new core element to the framework: "Template".  Template is essentially a non-visual element that is used to declare namespaces.  Yes you can declare namespaces directly on elements themselves, but this can get a bit messy.  "Template" provides a uniform way of declaring namespaces and is quite useful in a few specific scenarios.  Let's take a look at how this works:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt; Now lets say we have a library which defines some custom elements, and these belong to a namespace called 'http://buckshotui.org/sprockets'. We can include these elements using a named namespace declaration:&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt; Ok, But Why?&lt;/span&gt;&lt;/h2&gt;To illustrate one example of the usefulness of namespaces, lets switch platforms and show a template from the (still experimental) SVG platform:&lt;br /&gt;&lt;br /&gt; The default namespace tells Buckshot template engine to only accept elements in the template that are part of the SVG platform library.  This also gives a good visual indicator to anyone looking at the template that, aha, this is targetting SVG.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Other Places to Use Namespaces&lt;/span&gt;&lt;/h2&gt;Essentially any time you want to declare a template using platform-specific elements (non-core elements), you will need to also declare a namespace.  This applies to deferred templates such as the ItemsTemplate component of an CollectionPresenter.  Let's see what that looks like:&lt;br /&gt;&lt;br /&gt; You might ask why the namespace for the ItemsTemplate isn't implicit since the template is declared within an CollectionPresenter. Good question!  For now, explicit namespacing is required for deferred templates, but this may change in the future.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Go Get It!&lt;/span&gt;&lt;/h2&gt;Namespace support is now available in the Buckshot core library and in the HTML and SVG (still experimental at the time of this post) platform libraries.  Give it a try and let me know what you think.  Here are the links:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://github.com/prujohn/Buckshot" target="_blank"&gt;Core Library&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://github.com/prujohn/buckshot_html" target="_blank"&gt;HTML Platform&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://github.com/prujohn/buckshot_svg" target="_blank"&gt;SVG Platform (experimental)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/BqEDCPh-y-o" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 23 Nov 2012 22:46:00 +0000</pubDate>
	<author>noreply@blogger.com (John Evans)</author>
<feedburner:origLink>http://phylotic.blogspot.com/2012/11/buckshot-now-supports-namespaces.html</feedburner:origLink></item>
<item>
	<title>Kevin Moore: Excited to see dart2js minified output getting smaller (real world numbers below)</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2115056243892631308.post-4783394738264924927</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/l2xC8FFaJkw/excited-to-see-dart2js-minified-output.html</link>
	<description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://draft.blogger.com/" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://gravatar.com/avatar/a6dba8dde1d2e987545720e40b4a529c?s=200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I noticed &lt;a href="http://code.google.com/p/dart/source/detail?r=15005"&gt;r15005&lt;/a&gt; turns on more renaming in dart2js with --minify so I thought I'd see the impact on &lt;a href="http://dart-lang.github.com/pop-pop-win/"&gt;Pop, Pop, Win!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The last time I did a build and deploy of PPW was on r14873.&lt;br /&gt;&lt;br /&gt;Here are the sizes of game.dart.js&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;dart2js&lt;/td&gt;&lt;td&gt;617,201 bytes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;closure compiler&lt;/td&gt;&lt;td&gt;621.07KB&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;gzip (via http)&lt;/td&gt;&lt;td&gt;107.7KB&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;dart2js is running with the --minify flag&lt;/li&gt;&lt;li&gt;I'm using the &lt;a href="http://code.google.com/p/closure-compiler/"&gt;closure-compiler&lt;/a&gt; with default settings. Build from 17 Sept, 2012&lt;/li&gt;&lt;li&gt;Notice how the output is bigger from closure? This is because output is optimized for gzip. Not intuitive, until you see the network panel in Chrome Dev Tools.&lt;/li&gt;&lt;li&gt;gzip is the size Chrome sees over the wire. Most servers gzip payloads. It's critical to pay attention to this number and not just the size on disk.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-8-5r9ATUd6o/UKZT8R0UpzI/AAAAAAAAIBE/_5gpcnBdJ9w/s1600/Screen+Shot+2012-11-16+at+8.56.51+AM.jpg" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="46" src="http://1.bp.blogspot.com/-8-5r9ATUd6o/UKZT8R0UpzI/AAAAAAAAIBE/_5gpcnBdJ9w/s640/Screen+Shot+2012-11-16+at+8.56.51+AM.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now with the bleeding edge build r15005&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;dart2js&lt;/td&gt;&lt;td&gt;451,183 bytes&lt;/td&gt;&lt;td&gt;&lt;b&gt;~33% smaller&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;closure compiler&lt;/td&gt;&lt;td&gt;388.71 KB&lt;/td&gt;&lt;td&gt;&lt;b&gt;~37% smaller&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;gzip (via http)&lt;/td&gt;&lt;td&gt;90.2KB&lt;/td&gt;&lt;td&gt;&lt;b&gt;~16% smaller&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-nSFvHp0lbYY/UKZUDNN3tYI/AAAAAAAAIBM/l04l1M31IqY/s1600/Screen+Shot+2012-11-16+at+9.47.56+AM.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-nSFvHp0lbYY/UKZUDNN3tYI/AAAAAAAAIBM/l04l1M31IqY/s1600/Screen+Shot+2012-11-16+at+9.47.56+AM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Notes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The output from dart2js is &lt;b&gt;substantially smaller&lt;/b&gt;. This is just the work from the dart2js guys recently. Amazing.&lt;/li&gt;&lt;li&gt;This time the output from the closure is smaller than the input (~12%). I can only speculate why. Perhaps the new minified output is more optimizable?&lt;/li&gt;&lt;li&gt;The gain with gzip is not as big (~16%). I'm not surprised by this. PPW is a pretty big game. The json that stores the texture data alone is huge.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Keep in mind, the Dart source for the game is 1.5 MB as reported by dart2js.&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;info: compiled 1576654 bytes Dart -&amp;gt; 451183 bytes JavaScript in web/game.dart.js&lt;/span&gt;&lt;/blockquote&gt;Is it fair to say we're getting ~94% smaller output? It depends on how valid one considers the the Dart code size reported by dart2js.&lt;br /&gt;&lt;br /&gt;But I certainly don't feel I need to justify the javascript output size for non-trivial apps anymore.&lt;br /&gt;&lt;br /&gt;Great work folks!&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/l2xC8FFaJkw" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 16 Nov 2012 14:58:00 +0000</pubDate>
	<author>noreply@blogger.com (Kevin Moore)</author>
<feedburner:origLink>http://work.j832.com/2012/11/excited-to-see-dart2js-minified-output.html</feedburner:origLink></item>
<item>
	<title>Christian Grobmeier: Roadcrew.js – Page switching like a Boss.</title>
	<guid isPermaLink="false">http://www.grobmeier.de/?p=1755</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/Mej4WCECiRY/roadcrew-js-page-switching-like-a-boss-16112012.html</link>
	<description>&lt;p&gt;When I started with mobile development I had only limited time available. The app should run on Android and iOS phones at the same time and therefore I looked into &lt;a href="http://incubator.apache.org/cordova/" target="_blank"&gt;Apache Cordova&lt;/a&gt; and &lt;a href="http://jquerymobile.com/" target="_blank"&gt;jQuery mobile&lt;/a&gt;. While the first one is enabling you to do mobile development with JavaScript and HTML5 in general (including hardware access), jQuery mobile is more or less a Widget factory and a framework to build your Apps. While jQuery mobile looked pretty nice it had one major drawback: it was slow as hell and way to complex to develop (for what it does). I need to add that I have used the versions before 1.0 and everything might be better meanwhile. But back than, it was like that.&lt;/p&gt;
&lt;p&gt;There were two things I loved on jQuery mobile. One was it’s look. And the other thing was the “single page” approach. It meant, you have all your App HTML basically in one file, showing only the parts which are necessary. &lt;/p&gt;
&lt;p&gt;When replacing jQuery mobile I used &lt;a href="http://twitter.github.com/bootstrap/" target="_blank"&gt;Twitter Bootstrap&lt;/a&gt;. Today I would probably look into &lt;a href="http://maker.github.com/ratchet/" target="_blank"&gt;Ratchet&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the page switching I didn’t find anything, so I decided to write some code myself. Because I listened to “We are the Roadcrew” from the great Rock’n'Roll band Motörhead and “Roadcrew” is a pretty great name for mobile things, I simply named it like that: Roadcrew.&lt;/p&gt;
&lt;p&gt;You can find more information on the official &lt;a href="http://grobmeier.github.com/Roadcrew.js/" target="_blank"&gt;Roadcrew-Website&lt;/a&gt;. Or you start with cloning &lt;a href="https://github.com/grobmeier/Roadcrew.js" target="_blank"&gt;Roadcrew from Github&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;How does it work?&lt;/h2&gt;
&lt;p&gt;It is pretty simple: include the Roadcrew.js files and make up your HTML, like for example:&lt;/p&gt;
&lt;pre class="brush: xml; title: ; notranslate"&gt;&amp;lt;div class="page start" id="login"&amp;gt;
...
&amp;lt;/div&amp;gt;
&amp;lt;div class="page" id="content"&amp;gt;
...
&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Every div which is a page, gets the “page” class. A page is basically the div which is shown on your mobile. You could also say “view” to it. Every page gets an ID. This is used to navigate between your pages. For example, if you want to show the “content” page, you would make up an link like:&lt;/p&gt;
&lt;pre class="brush: xml; title: ; notranslate"&gt;&amp;lt;a href="#content"&amp;gt;Leads to content&amp;lt;/a&amp;gt;
&lt;/pre&gt;
&lt;p&gt;To make this basic navigation work, you only need to make an instance of Roadcrew:&lt;/p&gt;
&lt;pre class="brush: jscript; title: ; notranslate"&gt;$(document).ready( function() {
   var roadcrew = new Roadcrew();
}
&lt;/pre&gt;
&lt;p&gt;This is jQuery code. And in fact Roadcrew.js uses jQuery. I will try to reduce the dependencies to a minimum in future and hopefully I can make it work with &lt;a href="http://zeptojs.com" target="_blank"&gt;Zepto.js&lt;/a&gt;. But for now you have to live with jQuery, which is said to be slower on mobiles than Zepto. Patches welcome!&lt;/p&gt;
&lt;h2&gt;Intercepting – show a loading page&lt;/h2&gt;
&lt;p&gt;On thing which really didn’t work well with jQuery mobile was to show a loading page. This is dead simple usually, but was forced to waste a lot of time to deal with it. In Roadcrew it’s pretty simple. You simply need to create an interceptor – something which is done before the actual target page is called.&lt;/p&gt;
&lt;p&gt;It could look like that:&lt;/p&gt;
&lt;pre class="brush: jscript; title: ; notranslate"&gt;roadcrew.intercept('#interceptingPage', function(dispatch) {
   roadcrew.flip('#loadingPage');
   $.post('ajax/test.html', function(data) {
      dispatch();
   });
});
&lt;/pre&gt;
&lt;p&gt;While the “flip” method just “flips” pages around, bypassing every potential interceptor, the dispatch() function argument is what you can think of “showing the actual target page”. With the code above you would show the loading page which is then visible until $.post is ready and calls the dispatch() function. &lt;/p&gt;
&lt;h2&gt;Call to arms: Error Handling&lt;/h2&gt;
&lt;p&gt;If your interceptor causes an error, you might want to have an error handler waiting for you. You can pass it on when registering your interceptor.&lt;/p&gt;
&lt;pre class="brush: jscript; title: ; notranslate"&gt;roadcrew.intercept('#troublePage', function(dispatch) {
   throw new RoadcrewError("I made trouble");
}, function(error) {
   $('#errorPage').find('.error').html(error.message);
   roadcrew.flip('#errorPage');
});
&lt;/pre&gt;
&lt;p&gt;As you can see, I throw an error in my dispatcher. The second function is my error handler which will work with the error handler.&lt;/p&gt;
&lt;p&gt;There is also a chance to define a global error handler, which deals with every error.&lt;/p&gt;
&lt;h2&gt;Dart port available&lt;/h2&gt;
&lt;p&gt;I ported Roadcrew to Dart. &lt;a href="http://www.dartlang.org" target="_blank"&gt;Dart&lt;/a&gt; is a great new language for the web. It is still a pretty young language and not so widely spread yet. Consider this port an experiment. If you want to compare JavaScript to Dart Code you might find this interesting too.&lt;/p&gt;
&lt;p&gt;I will create a blog post on Roadcrew.dart and my experiences on the port when I find some time.&lt;/p&gt;
&lt;h2&gt;Future&lt;/h2&gt;
&lt;p&gt;The current implementation is pretty small and it gives me everything I need. But I have already seen some things which might be useful for others. For example, there is no transition animation so far. It should be pretty easy to implement such a thing, I just didn’t do it. If you want to help me, send me a patch.&lt;/p&gt;
&lt;p&gt;As already mentioned I would like to support Zepto.js.&lt;/p&gt;
&lt;p&gt;There is now way to load new divs by AJAX. Currently I am unsure if this would just blow up the code or if it is really useful.&lt;/p&gt;
&lt;p&gt;And finally I need to say that there is always room to improve the current code itself.&lt;/p&gt;
&lt;p&gt;That all said, I hope that you’ll find it useful. If you have some feedback, let me know – either by mail or – if appropriate as feature wish or issue in the &lt;a href="https://github.com/grobmeier/Roadcrew.js/issues" target="_blank"&gt;issue tracker&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/Mej4WCECiRY" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 16 Nov 2012 11:02:40 +0000</pubDate>
<feedburner:origLink>http://www.grobmeier.de/roadcrew-js-page-switching-like-a-boss-16112012.html</feedburner:origLink></item>
<item>
	<title>John Evans: Dart Metadata Is Your Friend</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-5241411837426252509.post-2150364110211894976</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/TkmqmdGyExI/dart-metadata-is-your-friend.html</link>
	<description>&lt;span style="font-family: inherit;"&gt;Metadata is a recent feature addition to the Dart language.  The Dart SDK already includes a few metadata tags that (integrated with the Dart Editor) can help you catch common errors, and alert users to deprecated code.  In this post, we'll see how to use the two metadata types included in the SDK: '@deprecated' and '@override'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;What Is Metadata?&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Metadata is essentially a piece of information that can provide additional context to your code.  This information can be used by tools such as Dart Editor, and eventually by your own code via mirror-based reflection.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;According to the Dart Specification &lt;span style="background-color: white;"&gt;&lt;i&gt;"&lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="background-color: white; line-height: 22px;"&gt;Metadata can &lt;/span&gt;&lt;span style="background-color: white; line-height: 22px;"&gt;appear before &lt;/span&gt;&lt;span style="background-color: white; line-height: 22px;"&gt;a library, class, typedef, type parameter, constructor, factory, function, field, parameter, or variable declaration and before an import or export directive.&lt;/span&gt;&lt;span style="background-color: white;"&gt;"&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Using The Dart 'meta' Library&lt;/span&gt;&lt;/h2&gt;&lt;br /&gt;Since this is a package library, you'll need to add a reference to it in your application pubspec, and then run pub install (see &lt;a href="http://pub.dartlang.org/"&gt;pub.dartlang.org&lt;/a&gt; for more information about this process).  Once available, you can import the library like so:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; import 'package:meta/meta.dart';  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now that the metadata types are in scope for your app, it's time to put them to good use!&lt;br /&gt;&lt;h2&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Using the @deprecated Metadata Type&lt;/span&gt;&lt;/h2&gt;Let's say you have a class for a function that you no longer want users of your library to use.  By marking your object with the @deprecated tag, the Dart editor will strike-through any references to it, giving a great visual clue to the developer that they should use a new approach.&lt;br /&gt;&lt;br /&gt;First lets look at our function before @deprecated is applied:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-cU4f1BuhF9U/UJK0ALmf9wI/AAAAAAAAGEk/Jyhc3ZyJS7U/s1600/deprecated_before.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-cU4f1BuhF9U/UJK0ALmf9wI/AAAAAAAAGEk/Jyhc3ZyJS7U/s1600/deprecated_before.png" /&gt;&lt;/a&gt;&lt;/div&gt;Suddenly foo() isn't so cool anymore and we want to let users of the library know about it.  Let's add the @deprecated metadata and see what Dart Editor does:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Ggvxxj8RL7I/UJK0pYmcI7I/AAAAAAAAGE0/V7UEtJhLbO8/s1600/deprecated_after.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-Ggvxxj8RL7I/UJK0pYmcI7I/AAAAAAAAGE0/V7UEtJhLbO8/s1600/deprecated_after.png" /&gt;&lt;/a&gt;&lt;/div&gt;Notice how Dart editor strikes through not only the implementation function, but also any references to that function.  Neat huh?  The editor also gives other visual clues, such as an informational message and a squiggly underneath the reference.&lt;br /&gt;&lt;h2&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;Using the @override Metadata Type&lt;/span&gt;&lt;/h2&gt;Now this one I really like, because it's actually helped me catch a few inheritance-related bugs in my code.  Let's look at this example where we have a class Bar which inherits from a class Foo, and Bar wants to override some methods in Foo:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ASdLL7ZXnlM/UJK3CijxZKI/AAAAAAAAGE8/d5BHDXvOKCo/s1600/override.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-ASdLL7ZXnlM/UJK3CijxZKI/AAAAAAAAGE8/d5BHDXvOKCo/s400/override.png" width="263" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;By using the @override metadata type, we can see that the editor is helping us identify a problem in our Bar class, where we have a typo in the override class name.  Notice how we get no help on the 'donothing()' method in Bar, when we probably wanted to override 'doNothing()' in Foo. &lt;br /&gt;&lt;br /&gt;In larger, non-trivial applications these kinds of bugs can be nasty to track down, if you consider that this code...&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; new Bar().doThat();  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;...will happily execute and give you a result of "doThat" from Foo instead of the expected "Do that other thing." from Bar - leaving you with clenched fists and pulled hair as you try to trace down the problem..  In short, using @override every time you expect to be overriding a superclass method will help you avoid a whole class of bugs in your code.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Summary&lt;/span&gt;&lt;/h2&gt;Dart's metadata functionality is still in early days, but already proves quite helpful when combined with tools such as the Dart Editor.  Liberal use of @deprecated and @override will go along way toward making your code easier to work with and troubleshoot.  Give it a try in your code today and give your feedback to the Dart team.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://news.dartlang.org/2012/07/draft-spec-changes-for-metadata-in-dart.html"&gt;http://news.dartlang.org/2012/07/draft-spec-changes-for-metadata-in-dart.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.dartlang.org/docs/spec/latest/dart-language-specification.html#h.d0rowtffuudf"&gt;http://www.dartlang.org/docs/spec/latest/dart-language-specification.html#h.d0rowtffuudf&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/TkmqmdGyExI" height="1" width="1"/&gt;</description>
	<pubDate>Thu, 01 Nov 2012 18:07:00 +0000</pubDate>
	<author>noreply@blogger.com (John Evans)</author>
<feedburner:origLink>http://phylotic.blogspot.com/2012/11/dart-metadata-is-your-friend.html</feedburner:origLink></item>
<item>
	<title>John Evans: Common Dart Scenarios for the 'Future' API</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-5241411837426252509.post-3649768390183982058</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/kQNdxfFVb9o/common-dart-scenarios-for-future.html</link>
	<description>A &lt;a href="http://api.dartlang.org/docs/continuous/dart_core/Future.html" target="_blank"&gt;Future&amp;lt;T&amp;gt;&lt;/a&gt; object represents a unit of work that will complete at some point in the - you guessed it - future.  I use Futures a lot in my code and I thought that rather than do an exhaustive walk-through of the class itself, I'd share some of the more common patterns and concepts that I often find useful.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;In Future Does Not Mean In Parallel&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;If you come from the .net world, you'll probably have some experience with Task&amp;lt;T&amp;gt; and the whole parallel processing API.  Futures aren't that.  They are more like structured callbacks, which will almost always run in the same memory space and thread as your application.  They won't run in their own threads or multi-core on their own.  If you're interested in parallelism, consider exploring Dart's &lt;a href="http://api.dartlang.org/docs/continuous/dart_isolate.html" target="_blank"&gt;Isolates API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Futures Are Not Automatically Asynchronous&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;At the time of this writing, there is a &lt;a href="http://code.google.com/p/dart/issues/detail?id=3356" target="_blank"&gt;ticket open in the Dart queue&lt;/a&gt; to make all futures asynchronous, but for now what you are about to read remains accurate.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;It is important to understand that Futures are not necessarily asynchronous by default. Let's look at this example:&lt;/div&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; // This future is not asynchronous and will complete as soon as it is called.  &lt;br /&gt; Future&amp;lt;bool&amp;gt; greaterThan42(int number){  &lt;br /&gt;   final c = new Completer();  &lt;br /&gt;   c.complete(number &amp;gt; 42);    &lt;br /&gt;   return c.future;  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This above code is synchronous, in fact you can write it in a much more succinct way using the .immediate() constructor of the Future class:&lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; Future&amp;lt;bool&amp;gt; greaterThan42(int number) =&amp;gt;  new Future.immediate(number &amp;gt; 42);  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Futures are really most powerful when dealing with asynchronous work, lets use the Timer class to simulate that here:&lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; Future&amp;lt;bool&amp;gt; greaterThan42(num number){  &lt;br /&gt;   final c = new Completer();  &lt;br /&gt;   &lt;br /&gt;   void doWork(_){  &lt;br /&gt;    c.complete(number &amp;gt; 42);  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   // take 3 long seconds to return our result  &lt;br /&gt;   new Timer(3000, doWork);  &lt;br /&gt;   &lt;br /&gt;   return c.future;  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The example above uses the Timer asynchronously callback a function after a 3 seconds has elapsed.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;A Couple Of Common Future Scenarios&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span style="font-size: large;"&gt;Waiting For One Or More Futures To Complete&lt;/span&gt;&lt;/h3&gt;The futures API provides a very convenient way to deal with this scenario, in Futures.wait().  Lets see how it works by modifying our greaterThan42 future a bit. &lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; Future&amp;lt;bool&amp;gt; greaterThan42(num number, int howLongMs){  &lt;br /&gt;   final c = new Completer();  &lt;br /&gt;   &lt;br /&gt;   void doWork(_){  &lt;br /&gt;    c.complete(number &amp;gt; 42);  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   // take 3 long seconds to return our result  &lt;br /&gt;   new Timer(howLongMs, doWork);  &lt;br /&gt;   &lt;br /&gt;   return c.future;  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt; main(){  &lt;br /&gt;   Futures  &lt;br /&gt;    .wait([greaterThan42(5, 1000), greaterThan42(100, 3000)])  &lt;br /&gt;    .then((List&amp;lt;bool&amp;gt; results){  &lt;br /&gt;      print(results);  &lt;br /&gt;    }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;So what is happening above when we send a list of 2 futures into Futures.wait()?  Well, it waits!  It does all the mundane work necessary to be sure that all the futures in the list have completed.  It then itself returns a Future, containing a list of the results returned by the Futures we were waiting on.&lt;br /&gt;&lt;br /&gt;The results of running the above code will yield: &lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; [false, true]  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Similar to this, we often need to iterate over a list of objects, where a method in each object returns a future. Dealing with this in a standard iteration construct won't work cleanly,  because the iteration will continue happily along whether or not our future has completed.  We can use Futures.wait() and a .map() to deal with this nicely:&lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; main(){  &lt;br /&gt;   Futures   &lt;br /&gt;   .wait(listOfFoos.map((foo) =&amp;gt; foo.callFutureMethod()))   &lt;br /&gt;   .then(results){  &lt;br /&gt;     // now we can safely iterate the results of the future calls  &lt;br /&gt;     results.forEach((bar) { // ... });  &lt;br /&gt;   }   &lt;br /&gt; }   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style="font-size: large;"&gt;Working with Futures in Sequence&lt;/span&gt;&lt;/h3&gt;Often times we want to receive the result of some Future, and then pass that result into another Future.  Do this 4 or 5 times and you get a really nasty scaffolding effect: &lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; callFutureA()  &lt;br /&gt;   .then((resultA){  &lt;br /&gt;    callFutureB(resultA)  &lt;br /&gt;      .then((resultB){  &lt;br /&gt;       callFutureC(resultB)  &lt;br /&gt;         .then((resultC){  &lt;br /&gt;           print('Kill me now!');  &lt;br /&gt;         });  &lt;br /&gt;      });  &lt;br /&gt;   });  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Fortunately, the Future API gives us a nice way to deal with this as well, with Future.chain().  Future.chain() takes some result and then returns another future, such that you can keep your control flow flat: &lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; callFutureA()  &lt;br /&gt;  .chain((resultA) =&amp;gt; callFutureB(resultA))  &lt;br /&gt;  .chain((resultB) =&amp;gt; callFutureC(resultB))  &lt;br /&gt;  .chain((resultC) =&amp;gt; callFutureD(resultC))  &lt;br /&gt;  .then((resultD){  &lt;br /&gt;    print('Wait, don't kill me after all!');  &lt;br /&gt;   });  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Furthermore, if you are just doing a simple transforms on a future, you don't have to wrap all of your transformational functions in Futures.  You can use the Future.transform() function to achieve the same result:&lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; futureA(String foo) =&amp;gt; new Future.immediate('$foo A');  &lt;br /&gt; functionB(String foo) =&amp;gt; '$foo B';  &lt;br /&gt; functionC(String foo) =&amp;gt; '$foo C';  &lt;br /&gt; functionD(String foo) =&amp;gt; '$foo D';  &lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt; main(){  &lt;br /&gt;  futureA('Transform me!')  &lt;br /&gt;   .transform(functionB)  &lt;br /&gt;   .transform(functionC)  &lt;br /&gt;   .transform(functionD)  &lt;br /&gt;   .then((result) =&amp;gt; print('$result'));  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Yields: &lt;br /&gt;&lt;pre&gt;&lt;code style="color: black;"&gt; Transform me! A B C D&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, I could go off on a tangent here about the need for an &lt;b&gt;await &lt;/b&gt;keyword in Dart, and how that would make dealing with asynchronous control flows even more simple to work with, but I'll save that for another post (maybe).&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;&lt;span style="font-size: large;"&gt;Summary&lt;/span&gt;&lt;/h2&gt;The Future API provides a great way to manage asynchronous coding in Dart.  Smart use of the API will keep your asynchronous code well managed and readable.&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/kQNdxfFVb9o" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 05 Oct 2012 20:15:00 +0000</pubDate>
	<author>noreply@blogger.com (John Evans)</author>
<feedburner:origLink>http://phylotic.blogspot.com/2012/10/common-dart-scenarios-for-future.html</feedburner:origLink></item>
<item>
	<title>Dart: Terra Incognita (Ladislav Thon): So what's with this TypeScript thingie?</title>
	<guid isPermaLink="false">http://ladicek.github.com/2012/10/02/so-whats-with-this-typescript-thingie</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/Yg5Gb6wKMJ4/so-whats-with-this-typescript-thingie.html</link>
	<description>&lt;p&gt;It shouldn’t come as a surprise that the Dart community discusses &lt;a href="http://www.typescriptlang.org"&gt;TypeScript&lt;/a&gt; a lot. And I can’t come late. You’ll note that I’m obviously biased – I love Dart and know it inside and out, while the TypeScript language isn’t out longer than few hours and I only managed to skim through the specification. But I’ll try anyway.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Warning: this is mostly opinions. You won’t find almost any hard facts in this post (and it’s unlikely that I will ever write such post about TypeScript).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;First of all: TypeScript takes a very pragmatic approach. All valid JavaScript code is valid TypeScript code and TypeScript produces a human-style JavaScript as its output. Which means that TypeScript still retains all the quirks of JavaScript semantics, but it also means that people can immediately start to use it and integrate with existing JavaScript code seamlessly. That’s a real pain point of Dart, which, in this light, takes a more idealistic and more ambitious approach.&lt;/p&gt;

&lt;p&gt;JS interop seems to be the main design goal of TypeScript, because its static type system is specifically designed to be sound while covering all the JavaScript dynamicisms at the same time. The result is pretty impressive and also a bit weird. So here we have structurally typed interfaces and nominally typed classes. Both of them make sense in certain contexts, but combining them in one language – that’s a bold idea. I can’t decide if I like it or fear it… probably both. One thing should be made very clear about TypeScript, though – it &lt;em&gt;isn’t&lt;/em&gt; statically typed. Instead, it takes an &lt;em&gt;optional&lt;/em&gt; approach exactly as Dart. You don’t have to write type annotations, but once you do, the compiler will warn you about possible problems (while still generating the target JavaScript code).&lt;/p&gt;

&lt;p&gt;TypeScript doesn’t seem to be a big language. It takes JavaScript, adds type annotations, classes and interfaces, modules and maybe some other minor stuff (they plan to add generics and enums in the future). That made me wonder – given that the specification only covers the augmentations, how come it has 100 pages? Dart specification is about the same length, and it covers whole new language! The truth is that TypeScript specification is a lot more “wordy”, the Dart one is very abstract (which isn’t a bad thing). If they wanted, they could squeeze it in a half.&lt;/p&gt;

&lt;p&gt;But the current form of the specification and the language isn’t &lt;em&gt;that&lt;/em&gt; interesting. What’s more interesting is the future. TypeScript builds on existing JavaScript, the classes are even identical to the current ECMAScript 6 proposal. All nice and dandy… right now. I can easily imagine TypeScript reaching 1.0 before ES6 is published. What happens when some features that TypeScript has later come to JavaScript too, but in a slightly different shape? But perhaps using similar syntax with the same keywords? (Both classes and modules are first-class candidates.) Is TypeScript going to make backwards-incompatible changes, or is the “all JavaScript is valid TypeScript” mantra going to burn in hell? Or will they somehow manage to put new JS with old TS together, no matter what happens?&lt;/p&gt;

&lt;p&gt;Also, I think that while Anders Hejlsberg is a great language designer, he isn’t that great language maintainer. He keeps adding features to his languages relentlessly and even if the result is always backwards compatible, it also feels more and more like a mutant. I do hate Java, but I have to admire the fact that it still feels tight and consistent.&lt;/p&gt;

&lt;p&gt;To sum it up, I think that TypeScript has some very nice tricks in the bag and if I were to work on an existing JavaScript project right now, I would at least consider using it (unlike CoffeeScript and similar languages). But I also think that Dart’s approach of designing completely new language with completely new set of libraries and tools (and even with completely new DOM API!) is significantly better in the long term. And you expected that from me, didn’t you?&lt;/p&gt;

&lt;p&gt;P.S.: it’s great that the TypeScript compiler is open-source and readily available as a Node module, but the tooling is still proprietary. And it’s a VisualStudio-only plugin. That doesn’t impress me much.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/Yg5Gb6wKMJ4" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 02 Oct 2012 07:00:00 +0000</pubDate>
<feedburner:origLink>http://ladicek.github.com/2012/10/02/so-whats-with-this-typescript-thingie.html</feedburner:origLink></item>
<item>
	<title>John Evans: Switchy - A Starter MVVM App for Buckshot</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-5241411837426252509.post-17860411485888797</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/VJhbUZcd8-s/switchy-starter-mvvm-app-for-buckshot.html</link>
	<description>Switchy is a single page, content switching application that uses the MVVM pattern.  It is part of Buckshot's growing "starter projects" collection, and is included in the framework (/example/starter_projects/switchy).&lt;br /&gt;&lt;br /&gt;You can view it online here (Chrome Only): &lt;a href="http://www.buckshotui.org/switchy/"&gt;http://www.buckshotui.org/switchy/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It demonstrates a common application scenario:  A top-aligned menu, with a content area below.  It shows how to take advantage of the following Buckshot concepts:&lt;br /&gt;&lt;br /&gt;&lt;ul style="border: 0px; color: #333333; line-height: 22px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Use a master/content MVVM structure.&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Use content views with their own view models.&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Reference and use control extensions:.&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;DockPanel&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;MenuStrip, Menu, MenuItem&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;ModalDialog&lt;/li&gt;&lt;/ul&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Use default theme resources to create consistent UI appearance.&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Declare and use attached properties (DockPanel.dock)&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Use data binding, resource binding in templates and wire them up to view models.&lt;/span&gt;&lt;/li&gt;&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;span style="font-family: inherit;"&gt;Declare events in templates and wire them up to view models.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Switchy's layout is made of 3 main sections:  A menu strip, a status bar, and a content area.  These are illustrated in the image below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-8z-UvB5fxO4/UGmaDswt2dI/AAAAAAAAF6k/gmgiFfQ3_DA/s1600/layout_overview.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="302" src="http://1.bp.blogspot.com/-8z-UvB5fxO4/UGmaDswt2dI/AAAAAAAAF6k/gmgiFfQ3_DA/s400/layout_overview.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Selecting something from the menu, will trigger action in the master view model which will reflect in the page view.  These actions include switching the content area to a new content view, opening another web page, or displaying the "about" modal dialog, as seen below:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-DafQi8fd4jY/UGma1UPobyI/AAAAAAAAF6s/yT1bJA4G6GM/s1600/about_dialog.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://1.bp.blogspot.com/-DafQi8fd4jY/UGma1UPobyI/AAAAAAAAF6s/yT1bJA4G6GM/s400/about_dialog.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Notice how the modal dialog masks out the window until it receives input from the user.  Also notice how the status bar is updated to reflect what is happening in the application.&lt;br /&gt;&lt;br /&gt;The Switchy project is a great starting point for building an application with Buckshot.  &lt;a href="https://github.com/prujohn/Buckshot/tree/latest" target="_blank"&gt;Give it a try today&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/VJhbUZcd8-s" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 01 Oct 2012 13:37:00 +0000</pubDate>
	<author>noreply@blogger.com (John Evans)</author>
<feedburner:origLink>http://phylotic.blogspot.com/2012/10/switchy-starter-mvvm-app-for-buckshot.html</feedburner:origLink></item>
<item>
	<title>Trials (and Errors) in Dart: Dart Koans</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-377877168649731651.post-1728016646449272696</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/9BoIXz5GlIY/dart-koans.html</link>
	<description>&lt;p&gt;The next week or so, I'm going to be limited in the amount of time I will have for some programming. I will hopefully still get some programming in but I will be limited in how much time and frequency I will have for it. Because of that, and the fact that I'm a little impatient, I've decided to share some information on my current project.&lt;/p&gt; &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/-51ciJz-rpBg/UGjiHXQkjYI/AAAAAAAACmI/f9K2SXbB4fQ/s1600/dart_koans.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="198" src="http://4.bp.blogspot.com/-51ciJz-rpBg/UGjiHXQkjYI/AAAAAAAACmI/f9K2SXbB4fQ/s320/dart_koans.png" width="320" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;The project is &lt;a href="https://github.com/butlermatt/dart_koans"&gt;Dart Koans&lt;/a&gt;. It is inspired, though not based on, a ruby project of a similar name: &lt;a href="http://rubykoans.com/"&gt;Ruby Koans&lt;/a&gt;. I completed the Ruby Koans when I was first learning Ruby, having come from other similar languages like Python as well as from JavaScript. The Koans helped a lot because I learn really well from hands-on coding. Additionally, while covering the basics, it does dive right in.&lt;/p&gt; &lt;p&gt;I felt that a similar approach to learning Dart would be a great contribution to the community. There are many programmers coming in from other languages who are comfortable with the basic concepts and don't need some of the background or theory involved with traditional tutorials. They're familiar with what a variable is, and just want to know how they're used in Dart. They're itching to write some code in Dart to see how it feels.&lt;/p&gt; &lt;p&gt;The Dart Koans are for people new to Dart, and comfortable on the CLI (currently it's not recommended to run from the Dart editor, as it's blocked by a couple of bugs.&lt;br /&gt;1) &lt;a href="http://dartbug.com/4654"&gt;Issue 4654&lt;/a&gt; (Dart Editor should handle ANSI color output).&lt;br /&gt;or&lt;br /&gt;2) &lt;a href="http://dartbug.com/2789"&gt;Issue 2789&lt;/a&gt; (Provide a way to find out if stdout is connected to a terminal).&lt;/p&gt; &lt;p&gt;The idea behind Dart Koans is that you achieve enlightenment through failure. You start with many failing tests. And individually correct each test and re-run the program. With each run of the application you should get closer and closer to resolving all tests. Each test introduces a new concept of the Dart language or libraries. At the moment it is still very very early and only a small portion of the total tests are completed. Currently there are 55 tests. By the time this is completed I expect well over 300 or more. As each test fails it will provide the error, line and file to look at to correct the issue. Each test (using the &lt;a href="http://api.dartlang.org/docs/continuous/unittest.html"&gt;unittest library&lt;/a&gt;) is accompanied by several comments which will provide information about the concept being introduced.&lt;/p&gt; &lt;p&gt;Due to the early development stage, the tutorial is currently very much in the preview stage and far from its completed form. However I intend to add more tests and areas as much as I can. I'm interested in any feedback or comments or concerns but please keep in mind things are very much subject to change. Current output is primarily for demonstration purposes and is most likely not the final result.&lt;/p&gt; &lt;p&gt;Because I will be updating very frequently I will not be making many blog posts about the projecct unless its regarding a significant milestone or involves any major changes to the project.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/9BoIXz5GlIY" height="1" width="1"/&gt;</description>
	<pubDate>Sun, 30 Sep 2012 23:34:00 +0000</pubDate>
	<author>noreply@blogger.com (Matthew Butler)</author>
<feedburner:origLink>http://darttrials.blogspot.com/2012/09/dart-koans.html</feedburner:origLink></item>
<item>
	<title>Dart: Terra Incognita (Ladislav Thon): 3 ways how Dart could get even cooler</title>
	<guid isPermaLink="false">http://ladicek.github.com/2012/09/28/3-ways-how-dart-could-get-even-cooler</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/lCyJynn3z0E/3-ways-how-dart-could-get-even-cooler.html</link>
	<description>&lt;p&gt;Few days after I published &lt;a href="http://ladicek.github.io/2012/09/06/3-reasons-why-dart-is-cool.html"&gt;3 reasons why Dart is cool&lt;/a&gt;, I realized that should this be year 1998 or so, I would probably be writing &lt;em&gt;3 reasons why Java is cool&lt;/em&gt;. And it hit me hard, because I truly hate Java nowadays. What happened?&lt;/p&gt;

&lt;p&gt;See, my 3 reasons why Java is cool would probably look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it runs in a virtual machine (meaning no pointers and especially no pointer arithmetics, automatic memory management via garbage collection, sandboxing etc.);&lt;/li&gt;

&lt;li&gt;it has interfaces, which are great for describing APIs;&lt;/li&gt;

&lt;li&gt;it has a great standard library (kudos to Josh Bloch of the Java Collections Framework fame!).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These were all great innovations on the mainstream field (knowing that Lisp already had a VM in 1960’s, but that’s hardly mainstream) and we owe Java a lot, because we take them for granted nowadays. (I’m speaking about Java here because that’s what I do. The same applies to a bunch of other languages.) But as I said, I hate Java today (meaning I hate the language – I still very much love the JVM). The thing is – Java didn’t evolve very much. The only significant change was adding annotations and generics in Java 5, and I wouldn’t describe both of them as a great success. Closures are coming in Java 8 – at last! (That’s even more weird if we realize that closures didn’t make it into Java 1 &lt;a href="http://web.archive.org/web/20090421164500/http://blogs.sun.com/jag/entry/closures"&gt;merely because lack of time&lt;/a&gt;.) Traits too (stateless, I think) – hooray! The world has changed, and Java didn’t. Contrary to C#, for example (which, on the other hand, throws in features quite wildly).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Dart absolutely must evolve at a steady pace!&lt;/em&gt; Luckily, there are no signs that Dart will fall asleep. There will be no language changes for some time now, as Dart approaches M1, but mixins are coming afterwards and who knows what else (dynamic loading? Mirror builders? World peace?). Here are my post-M1 wishes (or even post-1.0, I don’t care that much about timing right now).&lt;/p&gt;

&lt;h2 id="language_support_for_asynchronous_programming"&gt;Language support for asynchronous programming&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dartbug.com/104"&gt;Dart issue #104&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is probably a no. 1 wish of all “seasoned” Dart programmers. Dart very much loves asynchrony (as JavaScript does), but doesn’t provide anything better than callbacks (with their famous nesting hell) and &lt;code&gt;Future&lt;/code&gt;s (which can get right into the same hell very fast with all those &lt;code&gt;chain&lt;/code&gt;s and &lt;code&gt;transform&lt;/code&gt;s).&lt;/p&gt;

&lt;p&gt;Luckily, we’re not on our own here. For quite some time, there has been an experimental implementation of the &lt;code&gt;await&lt;/code&gt; concept in the dart2js compiler. It is pretty much the same as in C# – it helps us write &lt;code&gt;Future&lt;/code&gt;-based asynchronous code in a similar-to-synchronous way. I like the fact that, unlike C#, there is no &lt;code&gt;async&lt;/code&gt; keyword and that we still know that we are dealing with &lt;code&gt;Future&lt;/code&gt;s. To me, it’s absolutely essential that the programmer can immediatelly tell whether some code is synchronous or asynchronous, because there are some fundamental differences in the computation model that we must be aware of.&lt;/p&gt;

&lt;p&gt;I like &lt;code&gt;await&lt;/code&gt; nowadays (I used to hate it and I still think that the fact that &lt;code&gt;async&lt;/code&gt; methods in C# run on another thread isn’t a great idea) and I’d love to see it in Dart. But please, &lt;em&gt;please&lt;/em&gt; (and this doesn’t only apply to Dart designers, but to all Dart programmers out there), don’t try to make async code look too much like sync code, it would burn us badly.&lt;/p&gt;

&lt;p&gt;(Funny thing here: if we didn’t have mutable state in the language, we wouldn’t have to worry that much about differences between sync and async code. We would have other issues, though, and as I said earlier, I believe that mutable state is essential for dealing with the real world.)&lt;/p&gt;

&lt;h2 id="unified_event_model_or_not_so_much"&gt;Unified event model (or not so much?)&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dartbug.com/1873"&gt;Dart issue #1873&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is also one thing that a lot of people is calling for. There is an event loop at the very heart of Dart, so it seems natural to have &lt;em&gt;one true event model&lt;/em&gt;. But there’s a problem with this – the DOM. Its event model is way too complex to be accomodated in a general event model for everything else. So here’s my proposal: try to get one reasonable, simple and universal event model together, but leave the DOM out. Two event models are still a hell better than everything-has-its-own-event-model situation that we are facing now.&lt;/p&gt;

&lt;p&gt;And how should it look like? We all know observers and observables, right? So that must be the way… Well, no. For one, I honestly believe that &lt;em&gt;observable&lt;/em&gt; is the single worst name in the whole history of computer science. It doesn’t describe what the object does, it only describes &lt;em&gt;what you can do to it&lt;/em&gt;. That sucks. And to be honest, I struggled with observers and observables a lot until I realized that it’s all about poor naming. &lt;code&gt;Observable&lt;/code&gt; should have been called &lt;code&gt;EventSource&lt;/code&gt; from the very beginning. Or something like that.&lt;/p&gt;

&lt;p&gt;Second, plain old observers (also called listeners) are extremely fragile, hard to compose, and, well, you should all read the &lt;a href="http://lampwww.epfl.ch/~imaier/pub/DeprecatingObserversTR2010.pdf"&gt;Deprecating the Observer Pattern&lt;/a&gt; paper by Ingo Maier, Tiark Rompf and Martin Odersky. They are going quite far and define a whole new dataflow-based language (a DSL on top of Scala, actually). I would stick with something not that advanced – a reactive model. But not the push-based reactive model we know from Reactive eXtensions for .NET. I want pretty much the pull-based reactive model from this paper you all just read (you didn’t? You most definitely should).&lt;/p&gt;

&lt;h2 id="a_little_richer_type_system"&gt;A little richer type system&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dartbug.com/22"&gt;Dart issue #22&lt;/a&gt; and/or &lt;a href="http://dartbug.com/5545"&gt;#5545&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://dartbug.com/41"&gt;Dart issue #41&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://dartbug.com/4938"&gt;Dart issue #4938&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sounds weird, but I really want the type system to be a little richer. Especially, I’m talking about two things: &lt;em&gt;nullable types&lt;/em&gt; and &lt;em&gt;union types&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Inventing &lt;code&gt;null&lt;/code&gt; was a &lt;a href="http://qconlondon.com/london-2009/presentation/Null+References:+The+Billion+Dollar+Mistake"&gt;billion-dollar mistake&lt;/a&gt;, as Tony Hoare explains. We all know that, as we all deal with &lt;code&gt;null&lt;/code&gt;s every day. C# looks like the leader here, having added nullable types in version 2 (but only for value types, which are by default non-null; reference types are always nullable and can’t be made non-null), a lot of other coming languages have non-null/nullable types as well. I want them in Dart too. And I especially want non-nullable to be the default (but that, sadly, isn’t probably going to happen). I don’t think that we need to enforce non-nullability at the runtime, this could (and should) only be a part of the static type system that is only checked in the IDEs and in the checked mode.&lt;/p&gt;

&lt;p&gt;With nullable types should also come some new operators: &lt;em&gt;null-safe navigation&lt;/em&gt; (&lt;code&gt;a.b&lt;/code&gt; throws &lt;code&gt;NullPointerException&lt;/code&gt; when &lt;code&gt;a&lt;/code&gt; is &lt;code&gt;null&lt;/code&gt;, but &lt;code&gt;a?.b&lt;/code&gt; returns &lt;code&gt;null&lt;/code&gt; in that case), &lt;em&gt;null-safe indexing&lt;/em&gt; (same as null-safe navigation, but for the &lt;code&gt;[]&lt;/code&gt; operator) and &lt;em&gt;default value&lt;/em&gt;, which is essentialy a shortened ternary operator (&lt;code&gt;a ?: b&lt;/code&gt; is equivalent to &lt;code&gt;a != null ? a : b&lt;/code&gt;; it is also called &lt;em&gt;the Elvis operator&lt;/em&gt; and this name itself is a good reason to prefer this syntax to JavaScript &lt;a href="http://wiki.ecmascript.org/doku.php?id=strawman:default_operator"&gt;proposed&lt;/a&gt; &lt;code&gt;a ?? b&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;And now for something completely different: it’s quite common in dynamically typed languages to accept objects of different classes as arguments to functions. Sadly, Dart’s type system can’t express this situation, so you are left alone (and in better case, it’s documented in the function’s documentation comment). I’d strongly prefer union types to be a part of the language, so that we can write self-documenting code like &lt;code&gt;setStyle(String name, String|int|CssValue value)&lt;/code&gt; instead of &lt;code&gt;setStyle(String name, value)&lt;/code&gt;. Note that this would have some (I think nice) consequences: type parameter constraints would immediatelly be more powerful. I know that generics are hard (and F-bounded quantification especially), but there are some incredibly smart people on the Dart team, so I believe that should this pose a problem, they will figure it out.&lt;/p&gt;

&lt;p&gt;With union types, some people would immediatelly want intersection types too. While they might be useful, I don’t really see the need right now. So I would skip them at the moment.&lt;/p&gt;

&lt;p&gt;Oh, and since we are talking union types… just give us proper &lt;code&gt;enum&lt;/code&gt;s (pretty please, with a cherry on top!).&lt;/p&gt;

&lt;h2 id="language_support_for_working_with_data"&gt;Language support for working with data&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dartbug.com/415"&gt;Dart issue #415&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href="http://dartbug.com/2949"&gt;Dart issue #2949&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And again, there’s more.&lt;/p&gt;

&lt;p&gt;At first, &lt;em&gt;LINQ&lt;/em&gt;. A huge number of people are screaming for something like LINQ in Dart. I personally don’t want all that expression trees machinery, but I admit that LINQ somewhat has a point. On the other hand, you can get quite far just by adding a bunch of useful methods to the &lt;code&gt;Collection&lt;/code&gt; class: &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;reduce&lt;/code&gt;, you know it. Take a look at &lt;a href="https://github.com/Ladicek/deequery"&gt;Deequery&lt;/a&gt;, it is – to my knowledge – the most advanced Dart library for this declarative/functional style of working with collections.&lt;/p&gt;

&lt;p&gt;But I think we could and &lt;em&gt;should&lt;/em&gt; do a little better. Back then when I was thinking about list comprehensions and how to generalize them, I came up with something very similar to LINQ. So, guys… what about collection comprehensions (supporting both &lt;code&gt;List&lt;/code&gt;s and &lt;code&gt;Set&lt;/code&gt;s)? And could we, somehow, extend them to &lt;code&gt;Map&lt;/code&gt;s too?&lt;/p&gt;

&lt;p&gt;And second, &lt;em&gt;pattern matching&lt;/em&gt;. This is useful in wide range of situations, not only when working with data, but I figured I will stick it in this bucket anyway. For all who are not familiar with this concept, imagine a &lt;code&gt;switch&lt;/code&gt; on steroids: a &lt;code&gt;switch&lt;/code&gt; that is able to dive into the structure of given object and when the structure matches given pattern (see?), it can also assign the real values to given variables.&lt;/p&gt;

&lt;p&gt;With the increasing popularity of schema-free databases (I’m a radical NoSQL guy as well ;-) ), we need better tools for working with dynamic data structures. And especially &lt;em&gt;nested&lt;/em&gt; data structures. I think that pattern matching can help us a lot in this area, and I’m sure that Dart designers will come up with other ways.&lt;/p&gt;

&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://dartbug.com/289"&gt;Dart issue #289&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I strongly believe that Dart must continue to innovate – and by innovate, I mean innovate on the mainstream field. The features I mentioned above are not really &lt;em&gt;formative&lt;/em&gt; parts of the language and some of them even appeared in mainstream languages before, but they will help us tremendously. I also believe that the Dart team knows very well what I am talking about and doesn’t want Dart to become “the next Java”. So… what are your favorite features that should appear in future Dart? Regexp literals, anyone? :-)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/lCyJynn3z0E" height="1" width="1"/&gt;</description>
	<pubDate>Fri, 28 Sep 2012 07:00:00 +0000</pubDate>
<feedburner:origLink>http://ladicek.github.com/2012/09/28/3-ways-how-dart-could-get-even-cooler.html</feedburner:origLink></item>
<item>
	<title>Dartery: js.dart Makes an Appearance on G+</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2353615879124191107.post-1860992363091355258</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/RmmlYJKUJf4/jsdart-makes-appearance-on-g.html</link>
	<description>Vijay Menon &lt;a href="https://plus.google.com/u/0/114045999004646044580/posts/27uYMrJfcU6" target="_blank"&gt;announced on Google+&lt;/a&gt; that the JS interop library he's been working on is coming along.&lt;br /&gt;&lt;br /&gt;I'll be checking this out as soon as possible, with the first task being to rewrite the Channel API library using js.dart rather than custom events. I also want to see what it's like to write a library in Dart and expose it to JavaScipt. If nice JavaScript APIs can be built with little effort on top of Dart libraries it would be a huge boon to Dart, in my opinion.&lt;br /&gt;&lt;br /&gt;The library is up on guthub, but the most interesting part to scan right now is the &lt;a href="http://dart-lang.github.com/js-interop/docs/js.html" target="_blank"&gt;dartdoc page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A few things about js.dart that might be interesting to readers:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The library is implemented on top of synchronous isolate send ports. Those will be useful for other purposes as well, including Dart&amp;lt;-&amp;gt;Dart proxies across isolates.&lt;/li&gt;&lt;li&gt;The library requires a bit of manual memory management, either via retain() and release() calls, or by running JS interop code inside a scoped() closure. See the dartdoc for examples.&lt;/li&gt;&lt;li&gt;The API currently provides untyped proxies to JavaScript objects, that is they don't have a Dart interface defined based on the Javascript object. Currently that would be impossible, because you can't define a class at runtime in Dart. It should be possible to hand-write typed wrappers on those proxies, but they will have to be careful to play well with the memory management. APIs with objects that have a very obvious lifetime should be relatively easy to wrap, I think.&lt;/li&gt;&lt;li&gt;Lists and Maps require special handling. Because arrays and objects are built-ins in JavaScript and there are no interfaces you won't be able to just send a Dart List to JS and always have it work as expected. It's impossible (with out ES6 Proxies or Object.observe) to invoke Dart modification methods like add() and remove() when the collections are modified in JS. This means that Dart Lists and Maps must be copied into JS, and read back later.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;It will be very interesting to see if automatic memory management can be made to work and if typed wrappers could be generated from JavaScript annotated with &lt;a href="https://developers.google.com/closure/compiler/docs/js-for-compiler" target="_blank"&gt;Closure-style type annotations&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All-in-all this is a very exciting development for Dart, and I think it's just the beginning.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/RmmlYJKUJf4" height="1" width="1"/&gt;</description>
	<pubDate>Tue, 25 Sep 2012 06:18:00 +0000</pubDate>
	<author>noreply@blogger.com (Justin Fagnani)</author>
<feedburner:origLink>http://dartery.blogspot.com/2012/09/jsdart-makes-appearance-on-g.html</feedburner:origLink></item>
<item>
	<title>Dartery: Using the App Engine Channel API in Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2353615879124191107.post-7368777037034277855</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/AM8D_VbWLZ8/using-app-engine-channel-api-in-dart.html</link>
	<description>In &lt;a href="http://dartery.blogspot.com/2012/09/dart-javascript-interop-through-custom.html" target="_blank"&gt;this post&lt;/a&gt;, I showed how to do a limited form of JS interop via custom events. This technique really only works well for asynchronous APIs, and is too tedious for large APIs, but it's quite reasonable for APIs that are event based because all you're doing is forwarding events across the JS/Dart divide.&lt;br /&gt;&lt;br /&gt;One such API that's been brought up in &lt;a href="https://groups.google.com/a/dartlang.org/d/topic/misc/SVnAy3CzHpY/discussion" target="_blank"&gt;misc@dartlang.org posts&lt;/a&gt; and &lt;a href="http://stackoverflow.com/questions/12351225/use-appengine-channel-api-with-dart" target="_blank"&gt;Stack Overflow questions&lt;/a&gt; is the Google App Engine &lt;a href="https://developers.google.com/appengine/docs/java/channel/" target="_blank"&gt;Channel API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For those who don't know, the Channel API is server-push for App Engine. The really nice thing is that it allows App Engine apps to send messages to browsers without having to know how it's done. It might use polling or hanging GETs or WebSockets... we don't know, or have to.  All you have to know is how to use the Channel API to register a client and send it a message.&lt;br /&gt;&lt;br /&gt;This is nice, but it presents a problem for porting to Dart. We can't just port the JavaScript, because the App Engine servers might send different versions of the JavaScript depending on what APIs the browsers and servers support. Instead we have to use the custom event technique to proxy the provided JavaScript API.&lt;br /&gt;&lt;br /&gt;I just pushed such a Dart version of the Channel API that uses custom events to Google Code.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/gwt-gae-channel/"&gt;http://code.google.com/p/gwt-gae-channel/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using it is fairly straightforward, here's an example that registers handler's to print all messages:&lt;br /&gt;&lt;pre class="syntax"&gt;openChannel(String token) {&lt;br /&gt;  Channel channel = new Channel(token);&lt;br /&gt;  Socket socket = channel.open()&lt;br /&gt;    ..onOpen = (() =&amp;gt; print("open"))&lt;br /&gt;    ..onClose = (() =&amp;gt; print("close"))&lt;br /&gt;    ..onMessage = ((m) =&amp;gt; print("message: $m"))&lt;br /&gt;    ..onError = ((code, desc) =&amp;gt; print("error: $code $desc"));&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;To port to Dart I created Dart versions of Channel and Socket, very much like the &lt;a href="http://code.google.com/p/gwt-gae-channel/" target="_blank"&gt;GWT port&lt;/a&gt;, but they work very differently, since Dart doesn't have JSNI or overlay types like GWT.&lt;br /&gt;&lt;br /&gt;In Dart the classes forward their method calls as custom events that are received in JavaScript handlers, and they listen for custom events that are fired when the Channel API calls our handlers on the JavaScript side.&lt;br /&gt;&lt;br /&gt;When a channel is opened the JavaScript handler creates a channel, opens it to get a socket and adds handlers to the socket that forward events back to Dart through custom events. It keeps track of sockets in a map keyed by token so that they can be later closed. The Dart side also keeps tracks of Sockets in a Map keyed by token so that it can associate messages received via custom event to the correct Socket instance. Thus, the tokens function as a Socket ids.&lt;br /&gt;&lt;br /&gt;This pattern of having maps of id-&amp;gt;instance on both sides of the JS/Dart divide is going to be common for this type of interop. The instances are proxys, and the ids help route messages to the right instance. The Channel API is small and naturally lends itself to this pattern especially using tokens as ids. For other APIs it might be necessary to generate synthetic unique ids for this purpose.&lt;br /&gt;&lt;br /&gt;If you're combining Dart and App Engine, and can make use of this library, please try it out and let me know if it's working for you. It probably needs more testing and of course, contributions are always welcome!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/AM8D_VbWLZ8" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 24 Sep 2012 00:22:00 +0000</pubDate>
	<author>noreply@blogger.com (Justin Fagnani)</author>
<feedburner:origLink>http://dartery.blogspot.com/2012/09/using-app-engine-channel-api-in-dart.html</feedburner:origLink></item>
<item>
	<title>Dartery: Memoizing Functions in Dart</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-2353615879124191107.post-3543148337503533046</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/jfnByfiIBq0/memoizing-functions-in-dart.html</link>
	<description>Today I saw a &lt;a href="http://www.reddit.com/r/programming/comments/109599/dynamic_programming_bayesian_blocks_adaptive/" target="_blank"&gt;post on Reddit&lt;/a&gt; about dynamic programming that reminded me of &lt;a href="http://en.wikipedia.org/wiki/Memoization" target="_blank"&gt;memoization&lt;/a&gt;, so I thought I'd try some experiments in Dart to see how it handles some of the more interesting techniques I've seen in other languages.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Dynamic_programming" target="_blank"&gt;Dynamic programming&lt;/a&gt; and memoization are concepts that are so useful that I remember being excited when I learned them, but actually disappointed that I hadn't learned them earlier. If you're not familiar with them, I highly recommend reading up.&lt;br /&gt;&lt;br /&gt;To very quickly summarize: memoization is the strategy of caching the results of function invocations and using the cache when possible on subsequent invocations instead of re-calculating the result. This can obviously speed up repeated function calls with the same arguments. Where things become awesomer is when dealing with recursive functions that call themselves multiple times with the same argument as they recurse. Naive implementations of such functions do a lot of repeated work and can run very slowly, and dynamic programming can dramatically speed them up.&lt;br /&gt;&lt;h2&gt;Example: Fibbonaci&lt;/h2&gt;The most common example is a function to calculate Fibbonaci numbers. The naive implementation looks like this:&lt;br /&gt;&lt;pre class="syntax" style="font-family: Courier New, Courier, monospace;"&gt;int fib(int n) =&amp;gt; (n &amp;lt; 2) ? n : fib(n - 1) + fib(n - 2);&lt;/pre&gt;This is pretty much a straight translation of the recursive relation definition of a Fibbonaci number. What's nice about this is that it's simple, it's a very common example of a recursive function, and was even the default example on the Dartboard for a while. The problem is that it's &lt;b&gt;slow&lt;/b&gt;. So slow that I hate ever seeing the naive version shown, even as an example, when a much faster version is still simple.&lt;br /&gt;&lt;br /&gt;Here's a version that uses dynamic programming:&lt;br /&gt;&lt;pre class="syntax" style="font-family: Courier New, Courier, monospace;"&gt;int dynamicfib(int n) {&lt;br /&gt;  var r = new List&amp;lt;int&amp;gt;(n + 1);&lt;br /&gt;  r[0] = 0;&lt;br /&gt;  r[1] = 1;&lt;br /&gt;  for (int i = 2; i &amp;lt; n + 1; i++) {&lt;br /&gt;    r[i] = r[i - 1] + r[i - 2];&lt;br /&gt;  }&lt;br /&gt;  return[n];&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;It runs &lt;b&gt;significantly&lt;/b&gt; faster. How much faster? In cases where the recursive version would still be running at the heat death of the universe, the non-recursive can give an answer while you wait. &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib(40)&lt;/span&gt; takes &lt;i&gt;41 seconds&lt;/i&gt; to compute recursively on my laptop, &lt;span style="font-family: Courier New, Courier, monospace;"&gt;dynamicfib&lt;/span&gt; takes &lt;i&gt;less than a millisecond. &lt;/i&gt;Whoa.&lt;br /&gt;&lt;h2&gt;Automatic Memoization&lt;/h2&gt;&lt;blockquote class="tr_bq"&gt;&lt;i&gt;"Memoization isn't cool. You know what's cool? Automatic memoization." - No One Ever&lt;/i&gt;&lt;/blockquote&gt;So our memoized Fibonacci function is about a zillion times faster than the recursive one. But it's not as obviously correct when compared to the recursive relation definition of a Fibbonaci number.&lt;br /&gt;&lt;br /&gt;If we could take the simple recursive definition and run it through a process where it just remembers previous values, then we would have a fast &lt;i&gt;and&lt;/i&gt; easy to inspect implementation.&lt;br /&gt;&lt;br /&gt;Since Dart supports first-class functions and closures we can try to write a function that takes a function and returns another function that does the same thing, but adds memoization.&lt;br /&gt;&lt;br /&gt;Here's my first attempt:&lt;br /&gt;&lt;pre class="syntax" style="font-family: Courier New, Courier, monospace;"&gt;memoize1(f(x)) {&lt;br /&gt;  var cache = new Map();&lt;br /&gt;  m(x) {&lt;br /&gt;    if (cache.containsKey(x)) {&lt;br /&gt;      return cache[x];&lt;br /&gt;    } else {&lt;br /&gt;      var result = f(x);&lt;br /&gt;      cache[x] = result;&lt;br /&gt;      return result;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  return m;&lt;br /&gt;}&lt;/pre&gt;Line-by-line, &lt;span style="font-family: Courier New, Courier, monospace;"&gt;memoize1&lt;/span&gt; takes a function f as an argument, creates a cache, defines a function m which first checks the cache for an existing value and returns it if found, or it calculates the value, caches the result and then returns it. Finally &lt;span style="font-family: Courier New, Courier, monospace;"&gt;memoize1&lt;/span&gt; returns that new function.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;memoize1&lt;/span&gt; is so named because it works for functions with one parameter. Dart lacks varargs as of now, so the wrapper function m must have a fixed number of arguments. &lt;a href="http://www.dartlang.org/articles/emulating-functions/" target="_blank"&gt;Function emulation&lt;/a&gt; would fix this, as would real vararg support.&lt;br /&gt;&lt;br /&gt;To use &lt;span style="font-family: Courier New, Courier, monospace;"&gt;memoize1&lt;/span&gt; we pass it a reference to fib like so:&lt;br /&gt;&lt;pre class="syntax" style="font-family: Courier New, Courier, monospace;"&gt;var fastfib = memoize1(fib);&lt;br /&gt;var f40 = fastfib(40);&lt;/pre&gt;Easy, right? The only problem is that &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fastfib(40)&lt;/span&gt; still takes 41 seconds to run. Why? because even though the initial call to &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fastfib&lt;/span&gt; uses the memoization wrapper, the recursive calls don't. They still call plain ol' &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib&lt;/span&gt;. Ouch.&lt;br /&gt;&lt;br /&gt;So what do we do? First let's consider how this works in other languages.&lt;br /&gt;&lt;br /&gt;One great thing about many dynamic languages (not to be confused with dynamic &lt;i&gt;programming&lt;/i&gt;!) is that it's often relatively easy to modify code at runtime, which makes writing an automatic memoizer that works on recursive function possible.&lt;br /&gt;&lt;br /&gt;For instance, in a language where you can rebind a function name, like Ruby or Javascript, you rebind  the original function name to a function that wraps the original and caches it's return values. Rebinding the name means that even the recursive calls in the function call the memoized version, not the original.&lt;br /&gt;&lt;br /&gt;In Python it's even easier because decorators capture calls to the function so that even rebinding isn't necessary.&lt;br /&gt;&lt;br /&gt;In a less dynamic* language like Dart we can't redefine a function and there are no decorators, so automatic memoization is much trickier. Mirrors and/or MirrorBuilders might help in the future, but they can't save us now.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;* "dynamic language" is such an overloaded term that things get confusing. Dart is still dynamically typed, but it's less easy to redefine functions and classes or introduce new variables, so it's in some ways less dynamic that Python, Javascript or Ruby.&lt;/span&gt;&lt;br /&gt;&lt;h2&gt;Designing for Memoization&lt;/h2&gt;What we can do though is write our function specifically so that it's amenable to this type of transformation. In order to do that we can't hardcode our recursive calls anymore because we must allow them to be replaced.&lt;br /&gt;&lt;br /&gt;What we do is pass the function to itself as an argument. This looks weird, but it lets us pass in a wrapper instead of the original function and then the recursive calls will call the wrapper. I'm pretty sure this either is an example of some kind of combinator or was used to derive a combinator in a programming languages class a long time back... but unfortunately I forget now.&lt;br /&gt;&lt;br /&gt;Here's the code: &lt;br /&gt;&lt;pre class="syntax" style="font-family: 'Courier New', Courier, monospace;"&gt;int fib1(int f(f2, n2), int n) =&amp;gt; (n &amp;lt;= 1) ? n : f(f, n - 1) + f(f, n - 2);&lt;br /&gt;&lt;br /&gt;int fib(int n) =&amp;gt; fib1(fib1, n);&lt;br /&gt;&lt;br /&gt;memoize1(f(f2, x)) {&lt;br /&gt;  var cache = new Map();&lt;br /&gt;  m(m2, x) {&lt;br /&gt;    if (cache.containsKey(x)) {&lt;br /&gt;      return cache[x];&lt;br /&gt;    } else {&lt;br /&gt;      var result = f(m2, x);&lt;br /&gt;      cache[x] = result;&lt;br /&gt;      return result;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  return (x) =&amp;gt; m(m, x);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;main() {&lt;br /&gt;  var fastfib = memoize(fib1);&lt;br /&gt;  print(fib(40);&lt;br /&gt;  print(fastfib(40));&lt;br /&gt;}&lt;/pre&gt;&lt;div&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib1&lt;/span&gt; is our modified Fibbonaci function that now takes two arguments: a function f with the same signature as fib1 that we use to make the recursive calls, and n the original argument.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib&lt;/span&gt; is the regular, easy-to-use, recursive Fibbonaci function that we create be passing &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib1&lt;/span&gt; to itself. The result is essentially the same as the original &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib&lt;/span&gt;.&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;The new &lt;/span&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;memoize1&lt;/span&gt; still takes one argument, but that argument is now a memoizable single-argument function, such as &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fib1&lt;/span&gt;. The wrapper &lt;span style="font-family: Courier New, Courier, monospace;"&gt;m&lt;/span&gt; takes a new argument, &lt;span style="font-family: Courier New, Courier, monospace;"&gt;m2&lt;/span&gt;, and now passes that to the recursive function so that when we pass the memoizing wrapper to itself, recursive calls call the wrapper and not the original function like before.&lt;br /&gt;&lt;br /&gt;Now when I run &lt;span style="font-family: Courier New, Courier, monospace;"&gt;fastfib(40)&lt;/span&gt; on my laptop it runs in 3ms. A little slower that &lt;span style="font-family: Courier New, Courier, monospace;"&gt;dynamicfib&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; due to the wrapper, using a Map rather than a List, and the few recursive calls that are actually made, but still roughly a zillion times faster than the original. Importantly for this exercise, the new &lt;/span&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;memoize1&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; will work on any recursive function written to take itself as a parameter. Now someone could include a memoize function in a library and developers can write functions that they can easily speed up.&lt;/span&gt;&lt;br /&gt;&lt;h2&gt;Reflections on Dart&lt;/h2&gt;I'm not sure that automatic memoization is actually that useful - it's probably better to have a programmer really understand the implications of caching results - but I think this exercise points out a few areas where Dart could improve.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Transforming functions is hard without varargs/kwargs. I suspect until then we'll see a bunch cases where a library has foo1, foo2, foo3 to transform functions with different arity. I'm not sure how transforming functions with key-word arguments could even work, except with apply() maybe.&lt;/li&gt;&lt;li&gt;It'd be nicer if developers didn't have to use the technique of passing a function to itself. I'm sure that's confusing to a lot of people. This is one reason I'd like to see Dart adopt &lt;a href="http://en.wikipedia.org/wiki/Python_syntax_and_semantics#Decorators" target="_blank"&gt;Python-style decorators&lt;/a&gt;, though with the arrival of the &lt;span style="font-family: Courier New, Courier, monospace;"&gt;@&lt;/span&gt; syntax for metadata, some thought would have to go into the syntax and how metadata and decorators co-exist.&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: inherit;"&gt;This technique is probably not going to work well in checked mode, because we can't force the wrapper to have the same runtime type as the function we're transforming. Generic functions might help in some cases, but in the general case we won't be able to specify or capture all the type parameters that the original function uses.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;It'd also be interesting to see how MirrorBuilders might come into play here. If it were possible to introspect the code of a function and transform it to build a new function, then we could memoize functions that we didn't even write. MirrorBuilders might not be possible in dart2js, but &lt;a href="http://groovy.codehaus.org/Compile-time+Metaprogramming+-+AST+Transformations" target="_blank"&gt;Groovy's compile-time AST transformations&lt;/a&gt; could be an inspiration here. We don't &lt;i&gt;need&lt;/i&gt; to do the memoize transformation at runtime, if we could run the mirror system at compile time we could generate new code that the VM or dart2js each could use.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Well, I hope that was interesting to at least someone out there. If anything it was fun to investigate, and if I got anything wrong, please let me know!&lt;br /&gt;&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/jfnByfiIBq0" height="1" width="1"/&gt;</description>
	<pubDate>Sun, 23 Sep 2012 03:08:00 +0000</pubDate>
	<author>noreply@blogger.com (Justin Fagnani)</author>
<feedburner:origLink>http://dartery.blogspot.com/2012/09/memoizing-functions-in-dart.html</feedburner:origLink></item>
<item>
	<title>Dartflash: dartflash has a new website</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-1498880416868353177.post-5562602386740476255</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/VTo6eOOVKsw/dartflash-has-new-website.html</link>
	<description>The Dart project is proceeding fast and soon they will reach Milestone 1. This milestone means that the language becomes pretty much stable and the team will focus more on the libraries and the tools in the future. At the same time or short after they will release the first version of the package manager called "Pub". I hope that dartflash will be listed on the package manager and if this happens the dartflash website has to become much more pretty.&lt;br /&gt;&lt;br /&gt;I'm not an expert in web development. I have some knowledge of HTML and CSS but i would need more practice to get better. Luckily Bootstrap (&lt;a href="http://twitter.github.com/bootstrap/"&gt;http://twitter.github.com/bootstrap&lt;/a&gt;) does a very good job and with little effort you get something that looks pretty nice. So here it is, not finished and still a lot of "lorem ipsum" texts, but much better than the old website :)&lt;br /&gt;&lt;br /&gt;It's a start: &lt;a href="http://www.dartflash.com/"&gt;http://www.dartflash.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/VTo6eOOVKsw" height="1" width="1"/&gt;</description>
	<pubDate>Sat, 22 Sep 2012 19:32:00 +0000</pubDate>
	<author>noreply@blogger.com (Bernhard Pichler)</author>
<feedburner:origLink>http://blog.dartflash.com/2012/09/dartflash-has-new-website.html</feedburner:origLink></item>
<item>
	<title>Trials (and Errors) in Dart: Resort to sort</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-377877168649731651.post-6568047967117937110</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/q3M1rpt14WM/resort-to-sort.html</link>
	<description>&lt;p&gt;So the past few days I've been playing around with some simple algorithms. I'm not 'professionally' trained, and most of my experience has been with what I've seen in code or have implemented myself. Does that make me less of a developer for not being &lt;i&gt;classically trained&lt;/i&gt;? Maybe, maybe not.&lt;/p&gt; &lt;p&gt;In particular I've been playing around with some of the sorting algorithms. Stuff like &lt;a href="http://en.wikipedia.org/wiki/Bubble_sort"&gt;Bubble sort&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Selection_sort"&gt;Selection sort&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Insertion_sort"&gt;Insertion sort&lt;/a&gt;, and of course &lt;a href="http://en.wikipedia.org/wiki/Quicksort"&gt;Quicksort&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;My first task as been to study the algorithm and look at whatever pseudo-code or explanation is presented for the algorithm. Study and understand it. Then is to walk away from any computer or anything, take a little break. After a short time I then pull out a pen and paper and write down a Dart version of the code. I write it out in front of me without referring to APIs, or without referencing the material.&lt;/p&gt; &lt;p&gt;I later then enter that code (or re-write it) into the Dart editor in a simple test file I have. I run it, fix my bugs, and run it again. My test file contains all of the various sorts as I learn them, it then prints out the sorted list and the time it took to complete (using a &lt;a href="http://api.dartlang.org/docs/continuous/dart_core/Stopwatch.html"&gt;Stopwatch&lt;/a&gt;). I also have a function to create a list of X size filed with values from &lt;a href="http://api.dartlang.org/docs/continuous/dart_math/Random.html#nextInt"&gt;Random.nextInt&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Being able to easily create a random list of a determined size is nice, as it allows me to easily increment the list size as I choose and see the differences in performance. For instance it took a list of almost 5000 items for Quicksort with the two isolates to be faster than the main-thread version of Quicksort. (See Edit note below)&lt;/p&gt; &lt;p&gt;Many of the algorithms I've implemented are without performance improvements and are far from the most efficient versions available. One thing I've noticed though is List.sort((a, b) =&amp;gt; a - b); has generally been one of the best performing algorithms, in lists of up to 10,000 items.&lt;/p&gt; &lt;p&gt;However as I mentioned none of the algorithms has been tuned for best performance or memory usage and are just the 'simple' versions of the algorithms just for my own learning purposes and less for actual performance comparisons. The performance comparisons are more of a visual reference to the &lt;a href="http://en.wikipedia.org/wiki/Big_O_notation"&gt;Big O Notation&lt;/a&gt; for myself.&lt;/p&gt; &lt;p&gt;[Edit:]So I was wrong. I had poorly implemented my Quicksort with Isolates. Very poorly. It was a hodgepodge of Futures and a custom callback. I went through and cleaned it up and changed it so it returned a Future instead of calling a callback. Once I did that I saw an over 10x speed increase in the Quicksort with Isolates version and it and was about the same speed as the Main-threaded Quicksort for lists below 500 items. And faster for lists greater than 500 items. This has more to do with my unfamiliarity with Isolates than with the algorithms themselves.[/Edit]&lt;/p&gt; &lt;p&gt;For those who may be interested, you can the current version of the file here: &lt;a href="https://github.com/butlermatt/sorting_dart"&gt;https://github.com/butlermatt/sorting_dart&lt;/a&gt;. As time goes by, I will be adding more algorithms (with comments) as I learn them myself. Again please recall these are not optimized in any way and are only presented as-is, as proof of concept.&lt;br /&gt;In time I may add some optimized versions of algorithms myself as I progress. Keep in mind however this is primarily a learning project and not designed for use. They may be (and are) buggy.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/q3M1rpt14WM" height="1" width="1"/&gt;</description>
	<pubDate>Wed, 19 Sep 2012 16:58:00 +0000</pubDate>
	<author>noreply@blogger.com (Matthew Butler)</author>
<feedburner:origLink>http://darttrials.blogspot.com/2012/09/resort-to-sort.html</feedburner:origLink></item>
<item>
	<title>Trials (and Errors) in Dart: Contributed Contributions</title>
	<guid isPermaLink="false">tag:blogger.com,1999:blog-377877168649731651.post-6420338107263992969</guid>
	<link>http://feedproxy.google.com/~r/dartosphere/~3/KktWUMdzVJk/contributed-contributions.html</link>
	<description>&lt;p&gt;So it has been quite some time since my last post. Today will be a relatively short one, but I think I'm going to try and get into the habit of writing a blog post now and then.&lt;/p&gt; &lt;p&gt;Today I wanted to mention a little about contributing back to Dart. This is something very easy for anyone to do, on a variety of different levels. First and foremost, I've been contributing in small ways in the past just by using Dart. And in particular by using Dart and filing bug reports when you run into something. Currently I have 15 bug reports that I have reported and are still open. And many more which have been fixed for a long time.&lt;/p&gt; &lt;p&gt;You can submit bug reports for not only code that isn't working correctly, but also for documentation which may need to be updated or corrected; for updates to the website; or even just style recommendations (particularly those which may apply to the &lt;a href="http://www.dartlang.org/articles/style-guide/"&gt;Style Guide&lt;/a&gt;).&lt;/p&gt; &lt;p&gt;Bug reports are a great way to contribute as the more bugs that are found and squashed the more stable and attractive Dart becomes.&lt;/p&gt; &lt;p&gt;Eventually you may start feeling comfortable enough to provide solutions to the bugs you provide. Either pasting in a suggestion into the bug report, or by submitting a patch.&lt;/p&gt; &lt;p&gt;Note: I will mention this here ahead of time. &lt;i&gt;Before Google can integrate any code you provide them, you must sign the &lt;a href="http://code.google.com/legal/individual-cla-v1.0.html"&gt;Contributor License Agreement (CLA)&lt;/a&gt;.&lt;/i&gt;&lt;/p&gt; &lt;p&gt;I have personally submitted patches to a number of areas of the Dart project. My first was to the dartlang.org website. I found a typo in the language tour. So I went to &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt; site. Found the &lt;a href="https://github.com/dart-lang/dartlang.org"&gt;Dartlang/dartlang.org repository&lt;/a&gt; and forked it. I made the edits that I saw needed to be corrected and issued a &lt;a href="https://github.com/dart-lang/dartlang.org/pull/2"&gt;pull request&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;One handy tip I received, was to use a rebase workflow when dealing with edits to the github repositories. After doing a bit of searching around, a very good article I found was &lt;a href="http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html"&gt;A Git Workflow for Agile Teams&lt;/a&gt;. This shows a very straight forward method of using rebase to create nice clean commits when pushing upstream. I still refer to it when working on patch for the sites.&lt;/p&gt; &lt;p&gt;After submitting a couple of corrections to the dartlang.org site(s) I began to feel comfortable enough with submitting code to the dart source code. This process is significantly different than just forking a github repository. First instead of using github, its best to follow the steps here for &lt;a href="http://code.google.com/p/dart/wiki/GettingTheSource"&gt;getting the source&lt;/a&gt;. Make sure you can build before trying to edit any code.&lt;/p&gt; &lt;p&gt;Once you've verified you can build after getting the source code for the first time. You can go ahead and make your changes. After making your changes, make sure you once again build. Then also make sure you can &lt;a href="http://code.google.com/p/dart/wiki/Building#Testing"&gt;pass the tests&lt;/a&gt;. If possible run as many tests as you can, not just specific to one area as you never know what else might rely on behaviour you didn't expect (I found this out the hard way myself).&lt;/p&gt; &lt;p&gt;If everything looks good with the test. &lt;a href="http://code.google.com/p/dart/wiki/Contributing"&gt;Submit your patch&lt;/a&gt;. I'll give you a hint now as well. Once the patch is uploaded, it will display a chromium code review site. Similar to: &lt;a href="https://chromiumcodereview.appspot.com/10918056/"&gt;https://chromiumcodereview.appspot.com/10918056/&lt;/a&gt; Be sure to go to that site. Edit the issue and add a reviewer (if you're not sure who should review ask in either the bug report that you're working on or from the &lt;a href="http://www.dartlang.org/mailing-list"&gt;mailing list&lt;/a&gt;). Update the issue once you've added a reviewer. Then click on '&lt;i&gt;Publish+Mail Comments&lt;/i&gt;'. If you don't do this, no one will know that your patch is waiting for review!!! (Mine waited over a week because I didn't do this haha).&lt;/p&gt; &lt;p&gt;Once your patch is looked at, you will usually get a 'lgtm' (Looks good to me) and possibly some suggestions on small typos to fix. If you get line comments on things to fix, then fix them in your code, then re-upload a patch (using the same method as  before). It will automatically associate it with your previous patch (as long as you're using the same git branch!). Then go to the comments in the source that were left for you, click on each. Then click on the 'Done' link. That will signal to the reviewer that you looked at each comment and addressed the issue. Once you've marked each comment as 'Done', then '&lt;i&gt;Publish+Mail Comments&lt;/i&gt;' again.&lt;/p&gt; &lt;p&gt;Usually by this point the reviewer will commit your patch for you into the source. They will usually link another patch ID, and on that patch ID will be a revision id such as &lt;a href="https://code.google.com/p/dart/source/detail?r=12278"&gt;https://code.google.com/p/dart/source/detail?r=12278&lt;/a&gt;. Once you have that you can also watch the &lt;a href="http://darttrials.blogspot.com/feeds/posts/buildbot.dartlang.org"&gt;buildbot progress&lt;/a&gt; for your patch to see if you end up breaking anything ;)&lt;/p&gt; &lt;p&gt;So that's a summary of how I have, and you can, contribute to Dart. Now get out there and enjoy it!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/dartosphere/~4/KktWUMdzVJk" height="1" width="1"/&gt;</description>
	<pubDate>Mon, 17 Sep 2012 19:15:00 +0000</pubDate>
	<author>noreply@blogger.com (Matthew Butler)</author>
<feedburner:origLink>http://darttrials.blogspot.com/2012/09/contributed-contributions.html</feedburner:origLink></item>

</channel>
</rss>
