Wednesday, February 27, 2013

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.

Crouton 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.

I got everything working on my wife's Samsung Series 5 Chromebook 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.

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 Chromebook Pixel!

Tuesday, February 19, 2013

In this episode of Dartisans, 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.

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:

Using GWT and Dart to manage different parts of the same page

Using Dart to retrieve JSON from a Java servlet

Using window.postMessage and JSNI to pass messages between GWT and Dart

Using JavaScript, JSNI, and Dart's js package for synchronous interoperability between GWT and Dart

Using CustomEvent objects and Elemental to pass messages between GWT and Dart

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.

Thursday, February 14, 2013

I have a buddy named Jeff Stewart who just graduated from St. Mary's College of California, which is where I'm from. He's fresh out of school and looking for his first programming job. He knows Python, Java, C++, etc. Here's his resume. I've code reviewed his code; he's smart, careful, and hard working.