Complex browser applications have interested me for some time, one of my first jobs after completing university was to develop a WYSIWYG editor that rendered from XML. Following that I produced a vehicle tracking system that used google maps to show live and historic data.
But what I’ve really wanted for some time are native classes, the ability to structure a project sensibly with many source files and a simple IDE with code-completion that works across project and third-party code alike, not just the core libraries.
Dart is an open-source Google-driven project that aims to ease the development of large scale browser applications. The language borrows features from a number of other languages and therefore feels very familiar to work with. It also provides a core set of libraries that give you a substantial amount of functionality along with a simple to use third-party packaging system.
Some of the features I like:
There are plenty of examples, blog posts and documentation so I’m not going to discuss the language here but talk about using it instead.
Mostly as a learning exercise I produced a couple of Dart packages.
My first foray into producing a library for Dart, this is a simple helper for building CSS3 animation rules.
In fact we decided that it was stable enough when we recently had need to quickly knock together an administration application (Nodal) which would permit nodes on a local network to securely connect to a server.
A Nodal server broadcasts over the local network so that it can be discovered by nodes. These nodes then announce themselves to the server via a REST interface (thanks to the wonderful ServiceStack libraries) and include their public SSH keys. The web interface on the server displays all of the nodes and allows valid ones to be enabled, at which point the node can SSH to the server and gain access to any services required for the current application through the use of port tunneling.
This method means that Nodal doesn’t care what application the nodes are for, it simply provides a way of connecting them together in a secure manner. It was initially developed for use in the Qui project.
Dart is a very promising project which can greatly improve the development experience as browser based applications become increasingly complex. I just hope that, with the dart2js compiler supporting all modern browsers, it will be sticking around for a while.