AboutBlogContact
TechnologyOctober 10, 2011 2 min read 42

Dart: Google's Early Vision for a Structured Web (2011)

AunimedaAunimeda
📋 Table of Contents

Dart: Google's Early Vision for a Structured Web

It’s October 2011, and the web development world is in a bit of a shock. Google has officially released Dart, a new "batteries-included" language designed to solve the fundamental problems of JavaScript: performance, structure, and scalability.

While we're all trying to use Object.create and prototypes, Dart gives us a familiar, class-based language that looks like a blend of Java and JavaScript.

Optional Typing

One of Dart’s most interesting features is optional types. You can write quick scripts without types, or add them for better tooling and documentation as your project grows.

// Dart 2011 syntax
class Hello {
  String name;
  
  Hello(this.name);
  
  void sayHi() {
    print("Hello, ${name}!");
  }
}

void main() {
  var h = new Hello("World");
  h.sayHi();
}

The Dart VM and "Dartium"

Google’s vision isn't just a transpiler (though they have dart2js). They want to ship a Dart VM directly in Chrome. They've even released "Dartium," a special build of Chromium that runs Dart natively. The speed difference is supposedly massive.

Libraries and Tools

Unlike JS, which has a fragmented ecosystem, Dart comes with a robust standard library for everything from collections to HTML manipulation.

import 'dart:html';

void main() {
  Element element = query("#my-button");
  element.on.click.add((event) {
    element.text = "Clicked!";
  });
}

Is 2011 the year JavaScript starts its decline? Only time will tell if the world is ready to switch to Google’s vision of a structured web.

Read Also

Chrome OS Cr-48: Living Entirely in the Browseraunimeda
Technology

Chrome OS Cr-48: Living Entirely in the Browser

Google has started shipping the Cr-48, a laptop with no 'desktop' and no 'files.' It's just a browser. Is the world ready for the Cloud OS?

RSS 0.90: Netscape's Simple Syndicationaunimeda
Technology

RSS 0.90: Netscape's Simple Syndication

A new XML-based format from Netscape promises to solve the 'information overload' problem by letting the content come to you.

JavaScript: The 10-Day Prototype at Netscapeaunimeda
Technology

JavaScript: The 10-Day Prototype at Netscape

Brendan Eich just created 'Mocha' in ten days for Netscape Navigator. It's a tiny scripting language that might just change the Web.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

Get Consultation All articles